feat: add secure auth, admin and postgres persistence
This commit is contained in:
+3
-2
@@ -1,7 +1,7 @@
|
||||
const CACHE_NAME = "roast-planner-static-v1";
|
||||
const APP_SHELL = [
|
||||
"/",
|
||||
"/index.html",
|
||||
"/landing.html",
|
||||
"/app.css",
|
||||
"/worksheet.css",
|
||||
"/manifest.webmanifest",
|
||||
@@ -40,7 +40,8 @@ self.addEventListener("fetch", (event) => {
|
||||
if (request.method !== "GET" || url.origin !== self.location.origin || url.pathname.startsWith("/api/")) return;
|
||||
|
||||
if (request.mode === "navigate") {
|
||||
event.respondWith(fetch(request).catch(() => caches.match("/index.html")));
|
||||
// Never serve authenticated application HTML from cache after logout.
|
||||
event.respondWith(fetch(request).catch(() => caches.match("/landing.html")));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user