Skip to content

docs: note that Cloudflare Rocket Loader must be disabled - #8026

Open
underw8 wants to merge 1 commit into
coder:mainfrom
underw8:docs/cloudflare-rocket-loader
Open

underw8 wants to merge 1 commit into
coder:mainfrom
underw8:docs/cloudflare-rocket-loader

Conversation

@underw8

@underw8 underw8 commented Sep 30, 2026 •

Copy link
Copy Markdown

Fixes #8017

Documents that Cloudflare's Rocket Loader must be disabled for hostnames serving code-server.

Why

Rocket Loader rewrites inline <script> tags at the edge and re-injects them from its own loader. The re-injected elements do not carry the CSP nonce, so the browser blocks them and the workbench never boots. The symptom is a blank page: every request returns HTTP 200, the server logs look healthy, and the only console output is Cannot determine URI for module id!.

It is hard to self-diagnose, and has now been reported three times over six years (#1451, #4164, #8017).

Upstream status

The CSP change is upstream, not code-server's. It landed in microsoft/vscode@90c5812 as a security fix: the old policy used a fixed literal nonce and computed its SHA-256 hashes over the fully rendered document, both of which weakened it to roughly 'unsafe-inline'. Dropping the inline bootstrap hashes was a side effect.

Upstream declined to restore the hashes or emit data-cf-settings tags (microsoft/vscode#337226), on the grounds that re-authorizing content after delivery is exactly what the nonce mechanism exists to prevent, and that deferring JS has no upside when the application is JS. They named this Configuration Rule as the correct fix and the one they will document.

Discussed in #8017; @code-asher confirmed a docs addition is the right move.

Change

One section under Expose code-server, placed after "TLS 1.3 and Safari" to match the existing pattern for environment-specific gotchas, plus the matching doctoc TOC entry.

Rocket Loader rewrites inline script tags at the edge and re-injects them
without the CSP nonce, so the browser blocks them and the page renders
blank with no actionable error. Document the Configuration Rule that
scopes Rocket Loader off for the code-server hostname.

Refs coder#8017, coder#1451, coder#4164, microsoft/vscode#337226

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@underw8
underw8 requested a review from a team as a code owner September 30, 2026 02:44

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document that Cloudflare Rocket Loader must be disabled (blank page, third report)

1 participant