aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components
diff options
context:
space:
mode:
authorPierre <397503+bemble@users.noreply.github.com>2022-05-30 17:03:28 +0200
committerPierre <397503+bemble@users.noreply.github.com>2022-05-30 17:03:28 +0200
commitf64278d41d9850461871c1c7908f0c35cbca05cd (patch)
tree30289f8d055c661016a6911f6568cf81b08bd73a /src/components
parent4353f5e03658778b526dca6b7dd3f5bd6e31e121 (diff)
downloadhomer-f64278d41d9850461871c1c7908f0c35cbca05cd.tar.gz
homer-f64278d41d9850461871c1c7908f0c35cbca05cd.tar.zst
homer-f64278d41d9850461871c1c7908f0c35cbca05cd.zip
feat(connectivity): change query parameter to change connectivity
Always use timestamp as query parameter instead of alive
Diffstat (limited to 'src/components')
-rw-r--r--src/components/ConnectivityChecker.vue5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/ConnectivityChecker.vue b/src/components/ConnectivityChecker.vue
index 0d7e79f..f2be652 100644
--- a/src/components/ConnectivityChecker.vue
+++ b/src/components/ConnectivityChecker.vue
@@ -56,7 +56,8 @@ export default {
56 56
57 // extra check to make sure we're not offline 57 // extra check to make sure we're not offline
58 let that = this; 58 let that = this;
59 return fetch(window.location.href + "?alive", { 59 const aliveCheckUrl = window.location.href + "?t="+(new Date().valueOf());
60 return fetch(aliveCheckUrl, {
60 method: "HEAD", 61 method: "HEAD",
61 cache: "no-store", 62 cache: "no-store",
62 redirect: "manual" 63 redirect: "manual"
@@ -64,7 +65,7 @@ export default {
64 .then(function (response) { 65 .then(function (response) {
65 // opaqueredirect means request has been redirected, to auth provider probably 66 // opaqueredirect means request has been redirected, to auth provider probably
66 if ((response.type === "opaqueredirect" && !response.ok) || [401, 403].indexOf(response.status) != -1) { 67 if ((response.type === "opaqueredirect" && !response.ok) || [401, 403].indexOf(response.status) != -1) {
67 window.location.href = window.location.href + "?t="+(new Date().valueOf()); 68 window.location.href = aliveCheckUrl;
68 } 69 }
69 that.offline = !response.ok; 70 that.offline = !response.ok;
70 }) 71 })