chore(fetcher): use well-working node user agent by default again

This commit is contained in:
WebStreamr 2025-06-04 18:36:33 +00:00
parent aa4c672594
commit efb0f96be2
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -30,7 +30,7 @@ describe('fetch', () => {
'Forwarded': 'for=127.0.0.1',
'Priority': 'u=0',
'Referer': 'https://some-url.test',
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',
'User-Agent': 'node',
'X-Forwarded-For': '127.0.0.1',
'X-Forwarded-Proto': 'https',
'X-Real-IP': '127.0.0.1',

View file

@ -72,7 +72,7 @@ export class Fetcher {
'Forwarded': `for=${ctx.ip}`,
'Priority': 'u=0',
'Referer': `${ctx.referer?.href ?? url.origin}`,
'User-Agent': this.hostUserAgentMap.get(url.host) ?? 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',
'User-Agent': this.hostUserAgentMap.get(url.host) ?? 'node',
'X-Forwarded-For': ctx.ip,
'X-Forwarded-Proto': url.protocol.slice(0, -1),
'X-Real-IP': ctx.ip,