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:57 +00:00
parent e355833f1c
commit d9f9a9a5f0

View file

@ -11,7 +11,7 @@ api.interceptors.response.use(
(response) => response, (response) => response,
(error) => { (error) => {
if (error.response?.status === 401) { 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) return Promise.reject(error)
} }