Repository navigation
feat(gateway): WebSockets on a site's route, a site served at a front's own root, and the provider's headers kept from sites (FD-4683) - #505
Merged
Conversation
…te at its own root, and the provider's headers kept from sites The gateway side of a computer reaching the run's websites by their names, lifted from #448: - A WebSocket to /website/<name>/ is relayed to the site, under the HTTP route's rules: refused at the paths the site's card reserves, with the role and forwarded address the gateway writes. - AgentEnv-Site-Root: a front that serves a site's route at a root of its own, as a computer's site proxy does, gets no X-Forwarded-Prefix. - The headers the sandbox provider in front of the gateway is sent, its credentials, are taken off every request the gateway forwards (AGENTENV_PROVIDER_REQUEST_HEADERS). - website/v1 browse_url: where a composer serves a site to a browser. Co-Authored-By: William Loo <william.loo@scale.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es either The website browser's CDP answer, its discovery and its WebSocket relay forwarded a request's headers on routes of their own, before the withheld filter; BrowserRoutes now takes the withheld names and drops them on all three. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
client_headers is what the gateway may pass on of a connection's headers, minus the hop-by-hop set and the provider's credentials; upstream_headers builds on it, and the CDP routes' discovery and WebSocket relay call it instead of filtering their own copies, so a header withheld once is withheld on every route. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale
added a commit
that referenced
this pull request
Nov 5, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The gateway side of a computer reaching the run's websites by their own names (
https://notes.test/), lifted out of #448 so it lands on main first. #448 keeps the computer side (the name table, the per-deploy CA and the site proxy) and is rebased onto this./website/<name>/is relayed to the site under the HTTP route's rules: refused at the paths the site's card reserves (its data plane and card), with the role and forwarded address the gateway writes, each message and either side's close relayed, a refused handshake's answer passed on, and a message over uvicorn's size closing both with 1009. Addswebsockets>=13to the gateway.AgentEnv-Site-Root, as a computer's site proxy will, is told noX-Forwarded-Prefix, so the site's links are rooted at/where the browser sees it. Its ownX-Forwarded-Hostand-Protostill win, as from any front.sandbox_request_header_names()) reach the gateway asAGENTENV_PROVIDER_REQUEST_HEADERSand are taken off every request it forwards, HTTP and WebSocket.browse_urlon website/v1.WEBSITE_BROWSE_URL_PARAM: where a composer serves a site to a browser, a path joined onto the composed card's address or a full URL. The provider reads the env card again once the sites are ready, so the card names them.Held back from #448: its role-key handling, as in #443.
Test
uv lock --checkclean.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no new blocking issues were found.Summary
The PR adds website WebSocket forwarding, root-address support, provider-header stripping, and website browse addresses.
Diagram
sequenceDiagram participant Client participant Gateway participant Site Client->>Gateway: Website HTTP or WebSocket request Gateway->>Gateway: Check reserved paths and remove provider headers Gateway->>Site: Forward with role and public address Site-->>Gateway: Response or WebSocket messages Gateway-->>Client: Relay response, messages, and closeReviews (3) · Last reviewed commit: "refactor(gateway): one rule for the head..." · Reviewed by Greptile