aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorPierre <397503+bemble@users.noreply.github.com>2022-05-16 14:52:46 +0200
committerPierre <397503+bemble@users.noreply.github.com>2022-05-16 14:52:46 +0200
commit4353f5e03658778b526dca6b7dd3f5bd6e31e121 (patch)
tree72ebb960401f6f523d714889704c9bc4a7c58256 /src
parent98b460d6fe0e09cbdbf37f882f5e5bf7daa48e73 (diff)
downloadhomer-4353f5e03658778b526dca6b7dd3f5bd6e31e121.tar.gz
homer-4353f5e03658778b526dca6b7dd3f5bd6e31e121.tar.zst
homer-4353f5e03658778b526dca6b7dd3f5bd6e31e121.zip
feat(auth): handle unauthorized request in connectivity
Reload page without cache if 401 and 403 status in response
Diffstat (limited to 'src')
-rw-r--r--src/components/ConnectivityChecker.vue2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/ConnectivityChecker.vue b/src/components/ConnectivityChecker.vue
index 1c677d2..0d7e79f 100644
--- a/src/components/ConnectivityChecker.vue
+++ b/src/components/ConnectivityChecker.vue
@@ -63,7 +63,7 @@ export default {
63 }) 63 })
64 .then(function (response) { 64 .then(function (response) {
65 // opaqueredirect means request has been redirected, to auth provider probably 65 // opaqueredirect means request has been redirected, to auth provider probably
66 if (response.type === "opaqueredirect" && !response.ok) { 66 if ((response.type === "opaqueredirect" && !response.ok) || [401, 403].indexOf(response.status) != -1) {
67 window.location.href = window.location.href + "?t="+(new Date().valueOf()); 67 window.location.href = window.location.href + "?t="+(new Date().valueOf());
68 } 68 }
69 that.offline = !response.ok; 69 that.offline = !response.ok;