fix(fetcher): use "node" as user agent explicitly

no idea why, but this avoids challenges so far..
This commit is contained in:
WebStreamr 2025-06-01 19:30:24 +00:00
parent 2eb09fc65a
commit c3a2f9fdc6
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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.3',
'User-Agent': 'node',
'X-Forwarded-For': '127.0.0.1',
'X-Forwarded-Proto': 'https',
'X-Real-IP': '127.0.0.1',

View file

@ -36,7 +36,7 @@ export class Fetcher {
'Forwarded': `for=${ctx.ip}`,
'Priority': 'u=0',
'Referer': `${ctx.referer?.href ?? url.origin}`,
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.3',
'User-Agent': 'node',
'X-Forwarded-For': ctx.ip,
'X-Forwarded-Proto': url.protocol.slice(0, -1),
'X-Real-IP': ctx.ip,