Skip to content

Web terminal fails under CSP when Ghostty WASM loads via data URL #9185

@xomaxie

Description

@xomaxie

When running the web UI behind a strict CSP (connect-src 'self'), the terminal fails to load. Console shows "Fetch API cannot load data:application/wasm;base64,..." and "Failed to load ghostty-vt.wasm". This happens in Safari/Firefox and in Cloudflare Access setups with default CSP.

Repro:

  1. Run opencode web
  2. Serve UI with CSP connect-src 'self'
  3. Open terminal -> blank

Expected: terminal loads.
Actual: Ghostty WASM load blocked because it uses a data: URL.

Proposed fix: load ghostty-vt.wasm via asset URL instead of data: (Vite ?url).

Metadata

Metadata

Assignees

Labels

webRelates to opencode on web / desktop

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions