From e74904c848d4b82d2221a45e566eecc3a84062f0 Mon Sep 17 00:00:00 2001 From: Lena Fuhrimann <6780471+cloudlena@users.noreply.github.com> Date: Thu, 9 May 2024 19:29:51 +0200 Subject: [PATCH] Add Simple Analytics --- src/routes/+layout.svelte | 6 ++++++ src/routes/Analytics.svelte | 3 +++ svelte.config.js | 5 +++-- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 src/routes/Analytics.svelte diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index a188eb1a..99ff0e35 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,11 +1,13 @@ + diff --git a/svelte.config.js b/svelte.config.js index 2cbc11b3..ede0a2f2 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -12,9 +12,10 @@ const config = { csp: { directives: { 'default-src': ['self'], - 'script-src': ['unsafe-inline', 'self'], + 'script-src': ['unsafe-inline', 'self', 'https://scripts.simpleanalyticscdn.com'], + 'connect-src': ['self', 'https://queue.simpleanalyticscdn.com'], 'style-src': ['unsafe-inline', 'self'], - 'img-src': ['self', 'data:'], + 'img-src': ['self', 'data:', 'https://queue.simpleanalyticscdn.com'], 'font-src': ['self', 'data:'], 'object-src': ['none'], 'frame-ancestors': ['none'],