fix(web): logout-path parity, CSP header, epub display fallback + small review nits

This commit is contained in:
2026-09-07 17:17:33 +08:00
parent 67c95e7bdc
commit cc66a648b0
6 changed files with 35 additions and 16 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ export default defineConfig({
// ?v={hash} 的封面/CBZ 页/原文件 = 不可变 → cache-first(spec §6.1/§6.3)
urlPattern: ({ url }) =>
url.pathname.startsWith("/api/books/") &&
url.search.includes("v=") &&
url.searchParams.has("v") &&
(/\/cover$/.test(url.pathname) || /\/pages\/\d+$/.test(url.pathname) || /\/file$/.test(url.pathname)),
handler: "CacheFirst",
options: { cacheName: "booklib-immutable", expiration: { maxEntries: 3000, purgeOnQuotaError: true } },