Skip to content

Commit 9716c95

Browse files
mempkoclaude
andcommitted
fix: Linux desktop app freeze caused by restrictive CSP
The Tauri CSP only allowed 'self' for script-src/default-src. After redirecting from tauri://localhost to the Go backend at http://127.0.0.1, the CSP blocked resources from the backend origin, causing the WebKitGTK webview to freeze on Linux. Add http://127.0.0.1:* to all CSP directives and include 'unsafe-inline'/'unsafe-eval' for scripts so the SPA can load and run after navigation to the backend. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3b510d7 commit 9716c95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

desktop/src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
}
2121
],
2222
"security": {
23-
"csp": "default-src 'self'; connect-src 'self' http://127.0.0.1:* ws://127.0.0.1:*; img-src 'self' data:; style-src 'self' 'unsafe-inline'; font-src 'self' data:; object-src 'none'; frame-ancestors 'none'; base-uri 'none';"
23+
"csp": "default-src 'self' http://127.0.0.1:*; script-src 'self' http://127.0.0.1:* 'unsafe-inline' 'unsafe-eval'; connect-src 'self' http://127.0.0.1:* ws://127.0.0.1:*; img-src 'self' http://127.0.0.1:* data:; style-src 'self' http://127.0.0.1:* 'unsafe-inline'; font-src 'self' http://127.0.0.1:* data:; object-src 'none'; base-uri 'none';"
2424
}
2525
},
2626
"bundle": {

0 commit comments

Comments
 (0)