We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d87c53 commit 8b5deacCopy full SHA for 8b5deac
src/node/cli.ts
@@ -401,7 +401,10 @@ export async function readConfigFile(configPath?: string): Promise<Args> {
401
402
function parseBindAddr(bindAddr: string): [string, number] {
403
const u = new URL(`http://${bindAddr}`)
404
- return [u.hostname, parseInt(u.port, 10)]
+ // With the http scheme 80 will be dropped so assume it's 80 if missing. This
405
+ // means --bind-addr <addr> without a port will default to 80 as well and not
406
+ // the code-server default.
407
+ return [u.hostname, u.port ? parseInt(u.port, 10) : 80]
408
}
409
410
interface Addr {
0 commit comments