docs(workspace): clarify redirect401 401 contract (#5001)

This commit is contained in:
Rod Boev authored and nesquena-hermes committed 2026-06-26 22:09:09 +00:00
1 parent 3722c37eb6
commit 13879cebe9
1 file changed
+1
+1
View File
@@ -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();