Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

fix: add asset protocol to CSP connect-src for play mode fetch

esengine33d448bd78bc
diff --git a/desktop/src-tauri/tauri.conf.json b/desktop/src-tauri/tauri.conf.json
index 2ec0c12c1..1f1fad5c1 100644
--- a/desktop/src-tauri/tauri.conf.json
+++ b/desktop/src-tauri/tauri.conf.json
@@ -23,7 +23,7 @@
}
],
"security": {
- "csp": "default-src 'self' asset: http://asset.localhost ipc: http://ipc.localhost; connect-src 'self' blob: http://127.0.0.1:* http://localhost:*; script-src 'self' 'unsafe-inline' 'wasm-unsafe-eval' 'unsafe-eval' blob:; img-src 'self' asset: http://asset.localhost data:; style-src 'self' 'unsafe-inline'",
+ "csp": "default-src 'self' asset: http://asset.localhost ipc: http://ipc.localhost; connect-src 'self' blob: asset: http://asset.localhost http://127.0.0.1:* http://localhost:*; script-src 'self' 'unsafe-inline' 'wasm-unsafe-eval' 'unsafe-eval' blob:; img-src 'self' asset: http://asset.localhost data:; style-src 'self' 'unsafe-inline'",
"dangerousDisableAssetCspModification": [
"style-src"
],