Skip to content

[Bug] CSP blocks Cloud Workstation auth manifest in web UI #18505

Closed as not planned

Description

@dennisrutjes-1

Description

When running OpenCode's web interface inside a Google Cloud Workstation, the browser console is flooded with Content Security Policy errors. The Cloud Workstation proxy attempts to load a manifest for auth cookie forwarding, but OpenCode's CSP directive blocks it.

Console Errors

Loading a manifest from 'https://<port>-ws-<user>.cluster-<id>.cloudworkstations.dev/_workstation/forwardAuthCookie?redirectToken=...'
violates the following Content Security Policy directive: "default-src 'self'".
Note that 'manifest-src' was not explicitly set, so 'default-src' is used as a fallback.
The action has been blocked.

These errors repeat continuously (multiple times per page load).

Root Cause

OpenCode's web app sets default-src 'self' in its CSP header but does not explicitly set manifest-src. The Cloud Workstation reverse proxy injects a manifest link for forwardAuthCookie to maintain authentication, which gets blocked by the fallback to default-src.

Expected Behavior

The CSP should allow the Cloud Workstation's auth manifest to load without errors.

Suggested Fix

Add manifest-src 'self' https://*.cloudworkstations.dev to the CSP header, or more broadly allow manifest-src * since manifests are low-risk resources.

Alternatively, make the CSP configurable so that users behind reverse proxies (Cloud Workstations, Codespaces, etc.) can adjust it for their environment.

Environment

  • OpenCode web interface
  • Google Cloud Workstation (with auth proxy)
  • Chrome / Chromium-based browser

Activity

  1. github-actions commented on Mar 21, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues related to CSP strictness in the web UI. Please check:

    If your issue is distinct (specifically the Cloud Workstation auth manifest scenario), please confirm so maintainers can track it separately.

  2. removed
    webRelates to opencode on web / desktop
    on May 3, 2026
  3. github-actions commented on Jul 4, 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