From 9c9be027eea89a49a633b18438f3f16d11634532 Mon Sep 17 00:00:00 2001 From: Raymond <20248577+javaarchive@users.noreply.github.com> Date: Thu, 4 Apr 2024 21:30:07 -0700 Subject: [PATCH] Update app.js to csp properly for prod --- server/app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/app.js b/server/app.js index 4591eae..c98d69e 100644 --- a/server/app.js +++ b/server/app.js @@ -40,11 +40,12 @@ app.register(helmet, { contentSecurityPolicy: { directives: { defaultSrc: ['\'none\''], - styleSrc: ['\'unsafe-inline\'', '\'self\''], + styleSrc: ['\'unsafe-inline\'', '\'self\'', 'https://storage.amateurs.team'], scriptSrc: ['\'self\'', 'https://www.google-analytics.com', 'https://www.google.com/recaptcha/', 'https://www.gstatic.com/recaptcha/'], frameSrc: ['https://www.google.com/recaptcha/'], connectSrc: ['\'self\'', 'https://www.google-analytics.com'], - imgSrc: ['*', 'data:'] + imgSrc: ['*', 'data:'], + fontSrc: ['*'] } } })