Make connectivity check work with vitejs dev server

Head requests on directory path end up in 404
This commit is contained in:
Bastien Wirtz 2022-06-05 21:48:10 +02:00
parent cbbed6346a
commit c80854cb2d
2 changed files with 4 additions and 3 deletions

View File

@ -3,8 +3,9 @@
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0,viewport-fit=cover">
<meta name="robots" content="noindex">
<title>Homer</title>
</head>
<body>
<div id="app"></div>

View File

@ -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",