chore(fetcher): hardcode user-agent for now to avoid using "node"

This commit is contained in:
WebStreamr 2025-06-01 13:40:59 +00:00
parent ba9f33230f
commit 424ed78b93
No known key found for this signature in database
2 changed files with 2 additions and 0 deletions

View file

@ -30,6 +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',
'X-Forwarded-For': '127.0.0.1',
'X-Forwarded-Proto': 'https',
'X-Real-IP': '127.0.0.1',

View file

@ -36,6 +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',
'X-Forwarded-For': ctx.ip,
'X-Forwarded-Proto': url.protocol.slice(0, -1),
'X-Real-IP': ctx.ip,