fix: prevent infinite redirect loop on /login page
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 12s
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 12s
This commit is contained in:
parent
26f20cb826
commit
76f1dcbe8d
@ -85,7 +85,9 @@ apiClient.interceptors.response.use(
|
||||
}
|
||||
}
|
||||
clearStoredAdminUser()
|
||||
window.location.href = '/login'
|
||||
if (window.location.pathname !== '/login') {
|
||||
window.location.href = '/login'
|
||||
}
|
||||
return Promise.reject(new ApiError('登录已过期', 401))
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user