Skip to content

[Opencode WEB] Unable to add another opencode server due to CSP violation #19949

Closed as not planned

Description

@gund

Description

When I'm trying to add another Opencode server to existing Opencode web UI I'm getting CSP violation error:

Content-Security-Policy: The page’s settings blocked the loading of a resource (connect-src) at https://opencode.spark.lan/global/health because it violates the following directive: “connect-src 'self' data:”

Even if I specify that server URL via --cors flag on the server when I start it up is still does not allow to make requests to that domain.
It would be great to be able to add multiple Opencode servers in single web UI to easily switch between those and monitor those sessions in one place.
Thanks!

Plugins

OpenCode version

1.3.6

Steps to reproduce

  1. Start one or more Opencode server(s) that you will try to connect to
  2. Start local Opencode server and open it in web UI
  3. Click on server status and select manage servers
  4. Try to add those servers that you created in step 1

Screenshot and/or share link

Image Image

Operating System

WSL Ubuntu 22.04.5 LTS on Win11

Terminal

Windows Terminal

Activity

  1. added
    bugSomething isn't working
    on Mar 29, 2026
  2. Bacto commented on Apr 9, 2026

    @Bacto

    Hello,
    Same here.

    The default CSP seems too restrictive:

  3. removed
    bugSomething isn't working
    webRelates to opencode on web / desktop
    on May 3, 2026
  4. hadestructhor commented on May 5, 2026

    @hadestructhor

    Same here, in version 1.14.37, don't mind fixing it myself if that's okay

  5. playeriv65 commented on May 17, 2026

    @playeriv65

    Same problem on v1.14.47

  6. github-actions commented on Jul 17, 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