aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPierre <397503+bemble@users.noreply.github.com>2022-05-10 09:46:42 +0200
committerPierre <397503+bemble@users.noreply.github.com>2022-05-10 09:46:42 +0200
commit98b460d6fe0e09cbdbf37f882f5e5bf7daa48e73 (patch)
tree5c121c24a7de3c5f86197d570e98833d8557b321
parentbf2fcc6641643018bd5224ec2f8308173d54cfa4 (diff)
downloadhomer-98b460d6fe0e09cbdbf37f882f5e5bf7daa48e73.tar.gz
homer-98b460d6fe0e09cbdbf37f882f5e5bf7daa48e73.tar.zst
homer-98b460d6fe0e09cbdbf37f882f5e5bf7daa48e73.zip
fix(auth): add timestamp in URL to prevent infinite redirection loop
-rw-r--r--src/components/ConnectivityChecker.vue5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/ConnectivityChecker.vue b/src/components/ConnectivityChecker.vue
index a717bcf..1c677d2 100644
--- a/src/components/ConnectivityChecker.vue
+++ b/src/components/ConnectivityChecker.vue
@@ -17,6 +17,9 @@ export default {
17 }; 17 };
18 }, 18 },
19 created: function () { 19 created: function () {
20 if (/t=\d+/.test(window.location.href)) {
21 window.history.replaceState({}, document.title, window.location.pathname);
22 }
20 let that = this; 23 let that = this;
21 this.checkOffline(); 24 this.checkOffline();
22 25
@@ -61,7 +64,7 @@ export default {
61 .then(function (response) { 64 .then(function (response) {
62 // opaqueredirect means request has been redirected, to auth provider probably 65 // opaqueredirect means request has been redirected, to auth provider probably
63 if (response.type === "opaqueredirect" && !response.ok) { 66 if (response.type === "opaqueredirect" && !response.ok) {
64 window.location.reload(true); 67 window.location.href = window.location.href + "?t="+(new Date().valueOf());
65 } 68 }
66 that.offline = !response.ok; 69 that.offline = !response.ok;
67 }) 70 })