From 6f6a3ae2fd58548c66822309e8768ae0ef76d9a3 Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Sat, 29 Nov 2025 18:28:52 +0000 Subject: [PATCH] chore: remove proxy headers in requests --- src/utils/Fetcher.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/utils/Fetcher.ts b/src/utils/Fetcher.ts index f180bd4..836833e 100644 --- a/src/utils/Fetcher.ts +++ b/src/utils/Fetcher.ts @@ -146,8 +146,6 @@ export class Fetcher { const cookieString = this.cookieJar.getCookieStringSync(url.href); - const forwardedProto = url.protocol.slice(0, -1); - const hostUserAgent = this.hostUserAgentMap.get(url.host); response = await this.axios.request({ @@ -157,16 +155,9 @@ export class Fetcher { 'Accept-Language': 'en', ...(url.username && { Authorization: 'Basic ' + Buffer.from(`${url.username}:${url.password}`).toString('base64') }), 'Priority': 'u=0', - 'User-Agent': this.hostUserAgentMap.get(url.host) ?? 'Mozilla', + 'User-Agent': this.hostUserAgentMap.get(url.host) ?? 'Mozilla/5.0', ...(hostUserAgent && { 'User-Agent': hostUserAgent }), ...(cookieString && { Cookie: cookieString }), - ...(ctx.ip && { - 'Forwarded': `by=unknown;for=${ctx.ip};host=${url.host};proto=${forwardedProto}`, - 'X-Forwarded-For': ctx.ip, - 'X-Forwarded-Host': url.host, - 'X-Forwarded-Proto': forwardedProto, - 'X-Real-IP': ctx.ip, - }), ...requestConfig?.headers, }, ...(proxyUrl && this.getProxyConfig(proxyUrl)),