fix: add favicon domains to connect-src for service worker compatibility
The PWA service worker (workbox) fetches images via the Fetch API, which is governed by connect-src, not img-src. Add www.google.com, *.gstatic.com, and ciphera.net to connect-src so favicon and app icon fetches succeed.
This commit is contained in:
@@ -14,7 +14,7 @@ const cspDirectives = [
|
||||
"style-src 'self' 'unsafe-inline'",
|
||||
"img-src 'self' data: blob: https://www.google.com https://*.gstatic.com https://ciphera.net",
|
||||
"font-src 'self'",
|
||||
`connect-src 'self' https://*.ciphera.net https://cdn.jsdelivr.net${process.env.NODE_ENV === 'development' ? ' http://localhost:*' : ''}`,
|
||||
`connect-src 'self' https://*.ciphera.net https://ciphera.net https://www.google.com https://*.gstatic.com https://cdn.jsdelivr.net${process.env.NODE_ENV === 'development' ? ' http://localhost:*' : ''}`,
|
||||
"worker-src 'self'",
|
||||
"frame-src 'none'",
|
||||
"object-src 'none'",
|
||||
|
||||
Reference in New Issue
Block a user