🔧 fix: Fetch PWA Manifest with credentials over CORS (#5156)
When behind authentication (for eg: Cloudflare Access), browsers won't send credentials when fetching the manifest file by default. To fix, this change adds `crossorigin="use-credentials"` to the manifest link tag by enabling the `useCredentials` option in VitePWA.
This commit is contained in:
@@ -59,6 +59,7 @@ export default defineConfig({
|
||||
devOptions: {
|
||||
enabled: false, // enable/disable registering SW in development mode
|
||||
},
|
||||
useCredentials: true,
|
||||
workbox: {
|
||||
globPatterns: ['assets/**/*.{png,jpg,svg,ico}', '**/*.{js,css,html,ico,woff2}'],
|
||||
maximumFileSizeToCacheInBytes: 4 * 1024 * 1024,
|
||||
|
||||
Reference in New Issue
Block a user