docs(workspace): clarify redirect401 401 contract (#5001)
This commit is contained in:
1 parent
3722c37eb6
commit
13879cebe9
1 file changed
+1
@@ -47,6 +47,7 @@ async function api(path,opts={}){
|
||||
// and for subpath mounts like /hermes/, where /login escapes to the site root.
|
||||
if(res.status===401){
|
||||
if(redirect401) window.location.href='login?next='+encodeURIComponent(window.location.pathname+window.location.search);
|
||||
// Callers can opt out of navigation and handle the unauthenticated state themselves.
|
||||
return;
|
||||
}
|
||||
const text=await res.text();
|
||||
|
||||
Reference in new issue
Block a user