Skip to content

Commit a2d97f5

Browse files
committed
Fix update worker issues due to lack of old path redirect
Old UIs were still querying the old path (/update-worker.js) to refresh their service worker, which no longer exists. The new path works just fine, and is referenced correctly from the HTML, but wasn't accessed until _after_ the UI had updated, leaving us in a bit of a bind. This unties that knot with a proper redirect. We should probably leave this in place for quite a while, since it's required for updates until all UIs have reached this commit or later.
1 parent 916d9af commit a2d97f5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Caddyfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
header *.wasm Content-Type "application/wasm"
55

6+
rewrite /update-worker.js /ui-update-worker.js
7+
68
root * /site
79
try_files {path} /index.html
810
file_server

src/services/update-management.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import dedent from 'dedent';
2-
31
import registerUpdateWorker, {
42
ServiceWorkerNoSupportError
53
} from 'service-worker-loader!./ui-update-worker';

0 commit comments

Comments
 (0)