From c80854cb2d1e4ee0f96e8e5185b466b6c06c5416 Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Sun, 5 Jun 2022 21:48:10 +0200 Subject: Make connectivity check work with vitejs dev server Head requests on directory path end up in 404 --- src/components/ConnectivityChecker.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/components/ConnectivityChecker.vue b/src/components/ConnectivityChecker.vue index 2b3e47b..3066b7d 100644 --- a/src/components/ConnectivityChecker.vue +++ b/src/components/ConnectivityChecker.vue @@ -56,7 +56,7 @@ export default { // extra check to make sure we're not offline let that = this; - const aliveCheckUrl = window.location.href + "?t=" + new Date().valueOf(); + const aliveCheckUrl = `${window.location.origin}${window.location.pathname}/index.html?t=${new Date().valueOf()}`; return fetch(aliveCheckUrl, { method: "HEAD", cache: "no-store", -- cgit v1.2.3