mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-05 21:47:48 +01:00
Enable autoSelectFamily for http(s) requests (#2214)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user