Fix mid-session 401 redirecting iframe to wrong URL, causing portal EmbeddedFallback

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-10 11:43:58 +00:00
parent f3e02c3867
commit 084555efdb

View file

@ -11,7 +11,7 @@ api.interceptors.response.use(
(response) => response,
(error) => {
if (error.response?.status === 401) {
window.location.href = '/auth/login?redirect=' + encodeURIComponent(window.location.pathname)
;(window.top ?? window).location.href = '/login'
}
return Promise.reject(error)
}