vite-pwa / docs

Documentation: PWA integrations for Vite and the ecosystem
https://vite-pwa-org.netlify.app/
MIT License
196 stars 42 forks source link

How to set ignoreVary for matching cache in ? #107

Open bhcjohnnysiu opened 7 months ago

bhcjohnnysiu commented 7 months ago

How to set ignoreVary for matching cache in ?

userquin commented 7 months ago

check https://github.com/vite-pwa/sveltekit/issues/65#issuecomment-1734213190

bhcjohnnysiu commented 7 months ago

@userquin I tried adding the Workbox ignoreVary option, but that didn't help:

image

urlPattern: /^regexPattern$/, handler: 'NetworkFirst', options: { cacheName: 'api', expiration: { maxEntries: 500, maxAgeSeconds: 60 60 24 365 2, matchOptions: { ignoreVary: true } }, cacheableResponse: { statuses: [0, 200] } }

Did i miss something ?