perf(sw): Use relative addresses for better compatibility with reverse proxies (#1511)

This commit is contained in:
Rémi Marseault 2024-02-12 20:26:06 +01:00 committed by GitHub
parent 2922a85b6e
commit a3dc22e27e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View file

@ -8,15 +8,15 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="icon" href="favicon.ico" sizes="any" />
<link rel="icon" href="icon.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
<meta name="theme-color" content="#000" />
<title>VueTorrent</title>
<!-- PWA setup -->
<link rel="manifest" href="/manifest.webmanifest" crossorigin="use-credentials" />
<script src="/registerSW.js"></script>
<link rel="manifest" href="manifest.webmanifest" crossorigin="use-credentials" />
<script src="registerSW.js"></script>
</head>
<body>

View file

@ -1,4 +1,4 @@
'serviceWorker' in navigator &&
window.addEventListener('load', async () => {
await navigator.serviceWorker.register('/sw.js')
await navigator.serviceWorker.register('sw.js')
})