From f64278d41d9850461871c1c7908f0c35cbca05cd Mon Sep 17 00:00:00 2001 From: Pierre <397503+bemble@users.noreply.github.com> Date: Mon, 30 May 2022 17:03:28 +0200 Subject: feat(connectivity): change query parameter to change connectivity Always use timestamp as query parameter instead of alive --- src/components/ConnectivityChecker.vue | 5 +++-- 1 file 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 { // 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; }) -- cgit v1.2.3