mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-05 21:47:48 +01:00
Improvement: include longer auto-select timeout in http agent options
This commit is contained in:
@@ -111,7 +111,7 @@ export async function cachedRequest(url, duration = 5, ua = "homepage") {
|
|||||||
export async function httpProxy(url, params = {}) {
|
export async function httpProxy(url, params = {}) {
|
||||||
const constructedUrl = new URL(url);
|
const constructedUrl = new URL(url);
|
||||||
const disableIpv6 = process.env.HOMEPAGE_PROXY_DISABLE_IPV6 === "true";
|
const disableIpv6 = process.env.HOMEPAGE_PROXY_DISABLE_IPV6 === "true";
|
||||||
const agentOptions = disableIpv6 ? { family: 4, autoSelectFamily: false } : {};
|
const agentOptions = disableIpv6 ? { family: 4, autoSelectFamily: false } : { autoSelectFamilyAttemptTimeout: 500 };
|
||||||
|
|
||||||
let request = null;
|
let request = null;
|
||||||
if (constructedUrl.protocol === "https:") {
|
if (constructedUrl.protocol === "https:") {
|
||||||
|
|||||||
Reference in New Issue
Block a user