Enable `autoSelectFamily` for http(s) requests (#2214)

pull/2222/head
shamoon 7 months ago committed by GitHub
parent 241c981444
commit 0c8c759f8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -85,16 +85,20 @@ export async function httpProxy(url, params = {}) {
let request = null;
if (constructedUrl.protocol === "https:") {
const httpsAgent = new https.Agent({
rejectUnauthorized: false,
});
request = httpsRequest(constructedUrl, {
agent: httpsAgent,
agent: new https.Agent({
rejectUnauthorized: false,
autoSelectFamily: true,
}),
...params,
});
} else {
request = httpRequest(constructedUrl, params);
request = httpRequest(constructedUrl, {
agent: new http.Agent({
autoSelectFamily: true,
}),
...params,
});
}
try {

Loading…
Cancel
Save