rollback axios not redirecting on 401 errors for certain urls
This commit is contained in:
@@ -62,15 +62,7 @@ export default function ({ app, router }) {
|
|||||||
}
|
}
|
||||||
// unauthorized
|
// unauthorized
|
||||||
else if (error.response.status === 401) {
|
else if (error.response.status === 401) {
|
||||||
// bypass redirect for auth check endpoint
|
router.push({ path: "/expired" });
|
||||||
if (
|
|
||||||
error.config.url !== "_allauth/browser/v1/auth/session" ||
|
|
||||||
error.config.url !== "ws/dashinfo" // TODO once auth is working, need to extend it to websockets
|
|
||||||
) {
|
|
||||||
return Promise.reject({ ...error });
|
|
||||||
} else {
|
|
||||||
router.push({ path: "/expired" });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// perms
|
// perms
|
||||||
else if (error.response.status === 403) {
|
else if (error.response.status === 403) {
|
||||||
|
Reference in New Issue
Block a user