From 3f5c49d2cc26227cc6582a897b3b5bf67a60c0ae Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Thu, 22 Feb 2024 14:16:48 -0500 Subject: [PATCH] Add strict-ish CSP to Tauri config --- crates/tauri-app/tauri.conf.json | 2 +- ui/src/main.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/tauri-app/tauri.conf.json b/crates/tauri-app/tauri.conf.json index 162948c..590a67d 100644 --- a/crates/tauri-app/tauri.conf.json +++ b/crates/tauri-app/tauri.conf.json @@ -10,7 +10,7 @@ }, "app": { "security": { - "csp": null + "csp": "default-src 'self'; connect-src 'self' ipc.localhost; style-src 'self' 'nonce-cEStTGt8qsTHCwfCKZ5ecUbba33gWfrY'; img-src *" }, "windows": [ { diff --git a/ui/src/main.js b/ui/src/main.js index 8914d1b..ee521c7 100644 --- a/ui/src/main.js +++ b/ui/src/main.js @@ -49,6 +49,9 @@ app aliases, sets: { mdi }, }, + theme: { + cspNonce: 'cEStTGt8qsTHCwfCKZ5ecUbba33gWfrY', + }, }), ) .mount('#app');