fix(html-report): listen on 127.0.0.1 only (#15361)

Fixes #11568
This commit is contained in:
Max Schmitt 2022-07-05 17:48:30 +02:00 committed by GitHub
parent 8a8bdec87d
commit 35a2792bb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,7 @@ export class HttpServer {
this._activeSockets.add(socket);
socket.once('close', () => this._activeSockets.delete(socket));
});
this._server.listen(port);
this._server.listen(port, '127.0.0.1');
await new Promise(cb => this._server!.once('listening', cb));
const address = this._server.address();
assert(address, 'Could not bind server socket');