Requests fail because browser emulator changes accept-language
soundofspace opened this issue · 0 comments
soundofspace commented
Unblocked changes accept-language, because headless chrome doesn't always fill this in correctly. This breaks some websites where they manually overwrite this header with something custom/they expect.
To fix this there are multiple options:
- Remove this overwrite. Seems like chrome is doing it correctly now, and Unblocked is not following chrome behaviour.
- Only overwrite this when needed. How to detect?
- Only overwrite if request !isXhr. Info is there but is that enough?
Data to suggest that chrome is doing it correctly now, tested using chrome 109:
Locale set | Hero with overwrite | Headful Hero | Headless Hero | Native Chrome |
---|---|---|---|---|
nothing | en-US,en;q=0.9 | en-US,en;q=0.9 | en-US,en;q=0.9 | en-US,en;q=0.9 |
bg_BG | bg_BG;q=0.9 | bg_BG | bg_BG | bg |
en-US | en-US;q=0.9 | en-US | en-US | en-US |
en-US,en | en-US,en;q=0.9 | en-US,en;q=0.9 | en-US,en;q=0.9 | en-US,en;q=0.9 |