Skip to content

CSP missing opencode.ai connect-src and missing cache headers for proxied assets; file watcher causes HTTP bursts #18084

Closed as not planned

Description

@Dredok

Problem\n\n1. The CSP header in the server's catch-all route does not include in , blocking the changelog fetch.\n2. Proxied assets from lack headers, causing re-download on every page load.\n3. The file watcher calls and synchronously for each event, leading to bursts of HTTP requests when an agent writes many files rapidly.\n\n## Solution\n\n- Add to in CSP.\n- Add headers: for hashed assets under ; fallback for other proxied responses.\n- Implement a 150ms debounced batcher for file watcher invalidations.\n- Update watcher tests to use Bun's fake timers.\n\n## Testing\n\n- Built binary and verified changelog loads.\n- Checked DevTools → Network for new CSP directive and cache headers.\n- All watcher tests pass.\n\n## Checklist\n\n- [x] Code compiles and builds successfully.\n- [x] Binary runs and passes existing test suite.\n- [x] Changelog fetch works (CSP fix verified).\n- [x] Cache‑Control headers present as described.\n- [x] Debounced watcher reduces request bursts (observable in DevTools or netstat).\n- [x] No breaking changes to public APIs.\n

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    perfIndicates a performance issue or need for optimization
    on Mar 18, 2026
  2. github-actions commented on Mar 18, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • No issue template was used. Please use one of the three required templates: Bug Report, Feature Request, or Question.
    • The current format (Problem/Solution/Testing/Checklist) matches a pull request description rather than an issue. If you have already implemented fixes, please open a pull request instead.
    • If this is a bug report, use the Bug Report template and include a Description field with reproduction steps and context.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


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

    If you believe this was flagged incorrectly, please let a maintainer know.

  3. github-actions commented on Mar 18, 2026

    @github-actions
    Contributor

    This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

    Feel free to open a new issue that follows our issue templates.

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

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)perfIndicates a performance issue or need for optimization

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions