Skip to content

Embedded web UI CSP blocks the inline theme preload script #21088

Closed as not planned

Description

@MakingMofongo

Repro

  1. Run opencode web
  2. Open the web UI through a remote/Tailscale URL instead of localhost
  3. 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.

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 5, 2026
  2. github-actions commented on Apr 5, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is distinct from these, feel free to keep it open and clarify the differences.

  3. removed
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  4. mxl commented on May 6, 2026

    @mxl

    May be fixed by #25937

  5. github-actions commented on Jul 8, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions