Restricting to localhost (#16548)

Co-authored-by: Adam Weidman <adamfweidman@google.com>
This commit is contained in:
Coco Sheng
2026-01-15 13:59:34 -05:00
committed by GitHub
parent 9e13a43225
commit 5ba6e243b5
2 changed files with 43 additions and 4 deletions
+2 -2
View File
@@ -326,9 +326,9 @@ export async function createApp() {
export async function main() {
try {
const expressApp = await createApp();
const port = process.env['CODER_AGENT_PORT'] || 0;
const port = Number(process.env['CODER_AGENT_PORT'] || 0);
const server = expressApp.listen(port, () => {
const server = expressApp.listen(port, 'localhost', () => {
const address = server.address();
let actualPort;
if (process.env['CODER_AGENT_PORT']) {