From c7a28a7058ea5aecc7dbaad2722835842289fe73 Mon Sep 17 00:00:00 2001 From: Jens Kuerschner Date: Fri, 22 Sep 2023 16:50:38 +0200 Subject: [PATCH] csp test --- demo/nuxt.config.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/demo/nuxt.config.ts b/demo/nuxt.config.ts index 9754f867..b8a1504b 100644 --- a/demo/nuxt.config.ts +++ b/demo/nuxt.config.ts @@ -44,6 +44,18 @@ export default defineNuxtConfig({ crossOriginOpenerPolicy: 'same-origin', crossOriginEmbedderPolicy: 'unsafe-none', // the following needs to match the settings in ./public/staticwebapp.config.json + contentSecurityPolicy: { + 'base-uri': ["'self'"], + 'font-src': ["'self' data:"], + 'form-action': ["'self'"], + 'frame-ancestors': ["'self'"], + 'img-src': ["'self' https://add-to-calendar-button.com data:"], + 'object-src': ["'none'"], + 'script-src-attr': ["'self'"], + 'script-src': ["'self' 'unsafe-inline' https://*.add-to-calendar-button.com"], + 'style-src': ["'self' 'unsafe-inline' https://add-to-calendar-button.com"], + //'upgrade-insecure-requests': true, + }, referrerPolicy: 'strict-origin-when-cross-origin', strictTransportSecurity: { maxAge: 31536000,