Skip to content

Commit eca93b9

Browse files
authored
Determine if the port is specified in the URL. (#66)
1 parent 603d05f commit eca93b9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/sandbox/src/sandbox.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ export class Sandbox<Env = unknown> extends Container<Env> implements ISandbox {
135135
return parseInt(proxyMatch[1]);
136136
}
137137

138+
if (url.port) {
139+
return parseInt(url.port);
140+
}
141+
138142
// All other requests go to control plane on port 3000
139143
// This includes /api/* endpoints and any other control requests
140144
return 3000;

0 commit comments

Comments
 (0)