fix: allow Google Fonts in CSP so 3D announcement font loads in production

fontSrc blocked fonts.gstatic.com and styleSrc blocked fonts.googleapis.com,
causing Honk font to fail in production. The chromatic aberration pseudo-elements
then appeared as doubled plain text instead of a styled 3D effect.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-09 07:18:57 +00:00
co-authored by Claude Opus 4.6
parent b28d0b220e
commit 7b82803868
6 changed files with 135 additions and 38 deletions
+2 -2
View File
@@ -41,10 +41,10 @@ app.use('*', secureHeaders({
contentSecurityPolicy: process.env.NODE_ENV === 'production' ? {
defaultSrc: ["'self'"],
scriptSrc: ["'self'"],
styleSrc: ["'self'", "'unsafe-inline'"],
styleSrc: ["'self'", "'unsafe-inline'", 'https://fonts.googleapis.com'],
imgSrc: ["'self'", 'data:', 'blob:'],
connectSrc: ["'self'"],
fontSrc: ["'self'"],
fontSrc: ["'self'", 'https://fonts.gstatic.com'],
} : undefined,
}))