Compare commits

...
Author SHA1 Message Date
Tanish Manku 2487ce4c25 fix: port asset.localhost CSP fix to tauri-mac.conf.json 2026-04-03 14:31:07 -07:00
Tanish Manku 91a5e7e133 fix: allow fetch to asset.localhost in CSP for Windows drag-drop
On Windows production builds, convertFileSrc() generates
https://asset.localhost/... URLs. The connect-src CSP only had
"asset:" (covering asset:// on macOS/Linux) but not
https://asset.localhost, causing the fetch() in GlobalFileDropHandler
to be silently blocked — overlay appeared but no modal opened on drop.
2026-04-03 13:45:22 -07:00
2 changed files with 4 additions and 3 deletions
@@ -37,6 +37,7 @@
"'unsafe-eval'",
"'unsafe-inline'",
"asset:",
"https://asset.localhost",
"blob:",
"data:",
"http://ipc.localhost",
+3 -3
View File
@@ -7,12 +7,11 @@
"frontendDist": "../../../frontend/apps/artcraft/dist",
"devUrl": "http://localhost:5173",
"beforeDevCommand": "nx run artcraft:dev",
"beforeBuildCommand": "nx run artcraft:build"
"beforeBuildCommand": "npx run artcraft:build"
},
"app": {
"withGlobalTauri": true,
"windows": [
],
"windows": [],
"security": {
"assetProtocol": {
"enable": true,
@@ -37,6 +36,7 @@
"'unsafe-eval'",
"'unsafe-inline'",
"asset:",
"https://asset.localhost",
"blob:",
"data:",
"http://ipc.localhost",