]> git.immae.eu Git - github/bastienwirtz/homer.git/commitdiff
feat(connectivity): change query parameter to change connectivity
authorPierre <397503+bemble@users.noreply.github.com>
Mon, 30 May 2022 15:03:28 +0000 (17:03 +0200)
committerPierre <397503+bemble@users.noreply.github.com>
Mon, 30 May 2022 15:03:28 +0000 (17:03 +0200)
Always use timestamp as query parameter instead of alive

src/components/ConnectivityChecker.vue

index 0d7e79fb475950d4f1a6dd21c8d62e3d283ca9fc..f2be6523c18822d586a5917a2b14ee3d092c2186 100644 (file)
@@ -56,7 +56,8 @@ export default {
 
       // extra check to make sure we're not offline
       let that = this;
-      return fetch(window.location.href + "?alive", {
+      const aliveCheckUrl = window.location.href + "?t="+(new Date().valueOf());
+      return fetch(aliveCheckUrl, {
         method: "HEAD",
         cache: "no-store",
         redirect: "manual"
@@ -64,7 +65,7 @@ export default {
         .then(function (response) {
           // opaqueredirect means request has been redirected, to auth provider probably
           if ((response.type === "opaqueredirect" && !response.ok) || [401, 403].indexOf(response.status) != -1) {
-            window.location.href = window.location.href + "?t="+(new Date().valueOf());
+            window.location.href = aliveCheckUrl;
           }
           that.offline = !response.ok;
         })