mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 08:21:39 -06:00
fix(reader): support dynamic token-fetcher for foliate PWA caching
Implement a custom callable fetcher function in the Foliate integration that stringifies to the current auth token. This ensures backward compatibility for older service-worker cached versions of the Foliate library expecting a string token, while allowing newer/uncached versions to perform authenticated requests correctly. Additionally, exclude Foliate assets from PWA precaching to prevent stale cache bugs on Firefox. Closes #575
This commit is contained in:
@@ -79,6 +79,7 @@ export default defineConfig({
|
||||
},
|
||||
workbox: {
|
||||
globPatterns: ['**/*.{js,css,html,ico,png,svg,woff,woff2}'],
|
||||
globIgnores: ['**/assets/foliate/**'],
|
||||
navigateFallback: 'index.html',
|
||||
navigateFallbackDenylist: [/^\/api\//],
|
||||
runtimeCaching: [
|
||||
|
||||
Reference in New Issue
Block a user