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:
1 parent
20e3f7e501
commit
37270eab02
1 file changed
+25
-10
+25
-10
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "Transcript",
|
"productName": "Transcript",
|
||||||
"version": "0.1.0",
|
"version": "0.3.1",
|
||||||
"identifier": "com.transcript.desktop",
|
"identifier": "com.transcript.desktop",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "npm run dev",
|
"beforeDevCommand": "npm run dev",
|
||||||
@@ -14,23 +14,38 @@
|
|||||||
{
|
{
|
||||||
"title": "Transcript",
|
"title": "Transcript",
|
||||||
"label": "main",
|
"label": "main",
|
||||||
"width": 600,
|
"width": 380,
|
||||||
"height": 560,
|
"height": 460,
|
||||||
"minWidth": 360,
|
"minWidth": 360,
|
||||||
"minHeight": 420,
|
"minHeight": 72,
|
||||||
"resizable": true,
|
"maxWidth": 820,
|
||||||
|
"maxHeight": 460,
|
||||||
|
"resizable": false,
|
||||||
|
"maximizable": false,
|
||||||
|
"minimizable": true,
|
||||||
|
"closable": true,
|
||||||
"alwaysOnTop": true,
|
"alwaysOnTop": true,
|
||||||
"visible": true
|
"visible": true,
|
||||||
|
"decorations": false,
|
||||||
|
"transparent": true,
|
||||||
|
"backgroundColor": "#00000000",
|
||||||
|
"shadow": false,
|
||||||
|
"dragDropEnabled": false,
|
||||||
|
"center": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"security": {
|
"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": {
|
"bundle": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"targets": "all",
|
"resources": ["resources/whisper/"],
|
||||||
"icon": ["icons/icon.ico"],
|
"icon": [
|
||||||
"externalBin": ["binaries/sherpa-onnx-offline"]
|
"icons/32x32.png",
|
||||||
|
"icons/128x128.png",
|
||||||
|
"icons/[email protected]",
|
||||||
|
"icons/icon.ico"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user