From 53116d474033fa566de861bed4035c8036a1b059 Mon Sep 17 00:00:00 2001 From: Kiril Videlov Date: Sat, 14 Oct 2023 12:45:42 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix:=20add=20Content=20Security?= =?UTF-8?q?=20Policy=20(CSP)=20for=20dev=20mode=20too?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/tauri/tauri.conf.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/tauri/tauri.conf.json b/packages/tauri/tauri.conf.json index 142472e34..bf4ba587c 100644 --- a/packages/tauri/tauri.conf.json +++ b/packages/tauri/tauri.conf.json @@ -53,6 +53,15 @@ ], "targets": ["app", "dmg", "appimage", "deb", "updater"] }, + "security": { + "csp": { + "default-src": "'self'", + "img-src": "'self' asset: https://asset.localhost data: https://www.gravatar.com tauri://localhost https://avatars.githubusercontent.com", + "connect-src": "'self' https://eu.posthog.com https://app.gitbutler.com https://o4504644069687296.ingest.sentry.io ws://localhost:7703 https://github.com", + "script-src": "'self' https://eu.posthog.com", + "style-src": "'self' 'unsafe-inline'" + } + }, "systemTray": { "iconPath": "icons/tray.png", "iconAsTemplate": true