Repro
- Run
opencode web
- Open the web UI through a remote/Tailscale URL instead of localhost
- Sign in
The page hangs and the browser console shows:
Executing inline script violates the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval'"...
Cause
packages/opencode/src/server/instance.ts already hashes the inline oc-theme-preload-script for proxied HTML, but the embedded UI path still returns the default CSP without that hash.
Expected
Embedded HTML should use the same hashed CSP logic as the proxied HTML path so the inline theme preload script can run.
Repro
opencode webThe page hangs and the browser console shows:
Executing inline script violates the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval'"...Cause
packages/opencode/src/server/instance.tsalready hashes the inlineoc-theme-preload-scriptfor proxied HTML, but the embedded UI path still returns the default CSP without that hash.Expected
Embedded HTML should use the same hashed CSP logic as the proxied HTML path so the inline theme preload script can run.