cherry-pick(#30677): chore: print resolved host in the http server te… (#30679)

…rminal
This commit is contained in:
Yury Semikhatsky 2024-05-06 11:07:45 -07:00 committed by GitHub
parent 2d437e86e2
commit 54c157dec5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -126,7 +126,8 @@ export class HttpServer {
this._urlPrefix = address;
} else {
this._port = address.port;
this._urlPrefix = `http://${host}:${address.port}`;
const resolvedHost = address.family === 'IPv4' ? address.address : `[${address.address}]`;
this._urlPrefix = `http://${resolvedHost}:${address.port}`;
}
}
return this._urlPrefix;