fix: allow production font fetches through CSP

This commit is contained in:
2026-08-03 00:23:56 +05:30
parent 20f3564fb4
commit 510df11e83
+4 -2
View File
@@ -40,9 +40,11 @@ const config: AppConfig = {
directives: { directives: {
"default-src": ["'self'"], "default-src": ["'self'"],
"img-src": ["'self'", "data:", "https:"], "img-src": ["'self'", "data:", "https:"],
"font-src": ["'self'", "https://fonts.gstatic.com"], "font-src": ["'self'", "data:", "https://fonts.gstatic.com"],
"style-src": ["'self'", "https://fonts.googleapis.com"], "style-src": ["'self'", "https://fonts.googleapis.com"],
"connect-src": ["'self'"], // The service worker fetches and caches the configured Google Font.
// Service-worker fetch() is governed by connect-src as well as font-src.
"connect-src": ["'self'", "https://fonts.gstatic.com"],
}, },
}, },
}, },