Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/utils/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ export function httpRequest(params: HTTPRequestParams, onResponse: (r: http.Inco
const parsedProxyURL = normalizeProxyURL(proxyURL);
if (params.url.startsWith('http:')) {
options.path = url.toString();
const headers = options.headers || {};
if (!Object.keys(headers).some(header => header.toLowerCase() === 'host'))
headers.Host = url.host;
Comment thread
yury-s marked this conversation as resolved.
Outdated
options.headers = headers;
url = parsedProxyURL;
} else {
options.agent = new HttpsProxyAgent(parsedProxyURL);
Expand Down