Skip to content

Commit

Permalink
perf(sw): Use relative addresses for better compatibility with revers…
Browse files Browse the repository at this point in the history
…e proxies (#1511)
  • Loading branch information
Larsluph authored Feb 12, 2024
1 parent 2922a85 commit a3dc22e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion public/registerSW.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'serviceWorker' in navigator &&
window.addEventListener('load', async () => {
await navigator.serviceWorker.register('/sw.js')
await navigator.serviceWorker.register('sw.js')
})

0 comments on commit a3dc22e

Please sign in to comment.