switch back to ips
This commit is contained in:
parent
0fffa086b5
commit
62c5fb29d1
|
|
@ -63,7 +63,7 @@ export class TestProxy {
|
|||
this._prependHandler('request', (req: IncomingMessage) => {
|
||||
this.requestUrls.push(req.url);
|
||||
const url = new URL(req.url, `http://${req.headers.host}`);
|
||||
url.host = `localhost:${port}`;
|
||||
url.host = `127.0.0.1:${port}`;
|
||||
if (options?.prefix)
|
||||
url.pathname = url.pathname.replace(options.prefix, '');
|
||||
req.url = url.toString();
|
||||
|
|
@ -74,12 +74,12 @@ export class TestProxy {
|
|||
if (kConnectHostsToIgnore.has(req.url))
|
||||
return;
|
||||
this.connectHosts.push(req.url);
|
||||
req.url = `localhost:${port}`;
|
||||
req.url = `127.0.0.1:${port}`;
|
||||
});
|
||||
this._prependHandler('upgrade', (req: IncomingMessage) => {
|
||||
this.wsUrls.push(req.url);
|
||||
const url = new URL(req.url, `http://${req.headers.host}`);
|
||||
url.host = `localhost:${port}`;
|
||||
url.host = `127.0.0.1:${port}`;
|
||||
if (options?.prefix)
|
||||
url.pathname = url.pathname.replace(options.prefix, '');
|
||||
req.url = url.toString();
|
||||
|
|
|
|||
Loading…
Reference in a new issue