forked from extern/homer
feat(auth): handle unauthorized request in connectivity
Reload page without cache if 401 and 403 status in response
This commit is contained in:
parent
98b460d6fe
commit
4353f5e036
@ -63,7 +63,7 @@ export default {
|
||||
})
|
||||
.then(function (response) {
|
||||
// opaqueredirect means request has been redirected, to auth provider probably
|
||||
if (response.type === "opaqueredirect" && !response.ok) {
|
||||
if ((response.type === "opaqueredirect" && !response.ok) || [401, 403].indexOf(response.status) != -1) {
|
||||
window.location.href = window.location.href + "?t="+(new Date().valueOf());
|
||||
}
|
||||
that.offline = !response.ok;
|
||||
|
Loading…
Reference in New Issue
Block a user