fix(sw): stop precaching /404.html, it 403s and breaks the whole addAll
nginx serves /404.html as internal-only (see docker/nginx.conf) so it preserves the real 404 status via error_page - any direct client fetch, including the service worker's install-time addAll, gets a 403. Since addAll is atomic, that one bad URL was failing precache of the entire app shell.
This commit is contained in:
+1
-2
@@ -1,14 +1,13 @@
|
|||||||
// Bump this on every release that changes the app shell or the vendored
|
// Bump this on every release that changes the app shell or the vendored
|
||||||
// engine build — it's the only thing that invalidates old caches, since
|
// engine build — it's the only thing that invalidates old caches, since
|
||||||
// none of the cached URLs below are content-hashed by us.
|
// none of the cached URLs below are content-hashed by us.
|
||||||
const CACHE_VERSION = "v1";
|
const CACHE_VERSION = "v2";
|
||||||
const SHELL_CACHE = `shell-${CACHE_VERSION}`;
|
const SHELL_CACHE = `shell-${CACHE_VERSION}`;
|
||||||
const ENGINE_CACHE = `engine-${CACHE_VERSION}`;
|
const ENGINE_CACHE = `engine-${CACHE_VERSION}`;
|
||||||
|
|
||||||
const SHELL_ASSETS = [
|
const SHELL_ASSETS = [
|
||||||
"/",
|
"/",
|
||||||
"/play/",
|
"/play/",
|
||||||
"/404.html",
|
|
||||||
"/manifest.webmanifest",
|
"/manifest.webmanifest",
|
||||||
"/icons/icon-192.png",
|
"/icons/icon-192.png",
|
||||||
"/icons/icon-512.png",
|
"/icons/icon-512.png",
|
||||||
|
|||||||
Reference in New Issue
Block a user