security: define minimal frontend CSP

Replace the disabled Tauri CSP with explicit local IPC and API connectivity while retaining only required asset and inline-style allowances.
This commit is contained in:
evandrodevbr committed 2026-08-04 03:32:15 -03:00
1 parent 20e3f7e501
commit 37270eab02
1 file changed
+25 -10
+25 -10
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Transcript",
"version": "0.1.0",
"version": "0.3.1",
"identifier": "com.transcript.desktop",
"build": {
"beforeDevCommand": "npm run dev",
@@ -14,23 +14,38 @@
{
"title": "Transcript",
"label": "main",
"width": 600,
"height": 560,
"width": 380,
"height": 460,
"minWidth": 360,
"minHeight": 420,
"resizable": true,
"minHeight": 72,
"maxWidth": 820,
"maxHeight": 460,
"resizable": false,
"maximizable": false,
"minimizable": true,
"closable": true,
"alwaysOnTop": true,
"visible": true
"visible": true,
"decorations": false,
"transparent": true,
"backgroundColor": "#00000000",
"shadow": false,
"dragDropEnabled": false,
"center": true
}
],
"security": {
"csp": null
"csp": "default-src 'self' ipc: http://ipc.localhost; connect-src 'self' ipc: http://ipc.localhost http://127.0.0.1:8000; img-src 'self' asset: https://asset.localhost data:; style-src 'self' 'unsafe-inline'; script-src 'self'"
}
},
"bundle": {
"active": true,
"targets": "all",
"icon": ["icons/icon.ico"],
"externalBin": ["binaries/sherpa-onnx-offline"]
"resources": ["resources/whisper/"],
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/[email protected]",
"icons/icon.ico"
]
}
}