Relationships
#4795 The worker's data plane keeps the connect URL's path
Opened by zack · 11/16/2026· Shipped 11/16/2026
Issue 1 of 18 in the execution plan of design/surfaces/serve-workspaces.md. One PR. No dependencies.
Problem
A worker that connects to a serve at an address with a path, such as wss://host.example/w/x, opens its control socket at that path. Its data-plane requests then go to the root of the host instead.
Two places in src/worker/data_plane_client.ts drop the path:
dataPlaneUrlFromConnectUrlsets the pathname to/.- The client builds each request with
new URL(path, baseUrl). Every route starts with a slash, so it replaces whatever path the base has.
Serve workspaces put each workspace's serve at <host address>/w/<name>, so a worker for a workspace would send its data to the wrong serve. The same is true today for a single serve behind a reverse proxy that mounts it under a path.
Change
dataPlaneUrlFromConnectUrlkeeps the connect URL's path.- The client joins each route onto its base path instead of resolving it as an absolute path.
A connect URL with no path behaves exactly as it does now.
Done when
- A worker connected at
…/w/xsends its data-plane requests under/w/x/. - A worker connected at an address with no path sends the same requests it sends today.
- Unit tests in
src/worker/data_plane_client_test.tscover both, including a base path with and without a trailing slash.
Out of scope
The other clients (CLI, server login, the v3 datastore client). The next issue in the plan tests all of them behind a prefix.
Shipped
Click a lifecycle step above to view its details.
system commented 11/16/2026, 2:29:26 PM
Classified automatically when this issue was filed.
- Type: Bug
If you feel this classification is incorrect, add a ripple to tell us so.
Sign in to post a ripple.