dgtlmoon / changedetection.io

The best and simplest free open source web page change detection, website watcher, restock monitor and notification service. Restock Monitor, change detection. Designed for simplicity - Simply monitor which websites had a text change for free. Free Open source web page change detection, Website defacement monitoring, Price change notification
https://changedetection.io
Apache License 2.0
17.3k stars 965 forks source link

`Accept-Language` header gets ignored by Playwright #1412

Open wrobelda opened 1 year ago

wrobelda commented 1 year ago

Describe the bug I am trying to force a specific language version of a website, which they determine based on the Accept-Language header. However, Playwright seems to ignore it altogether. I tested independently using my desktop browser and setting the Accept-Language there works as expected: the specific language version of a website is shown depending on the header's content.

Version v0.40.1.1

To Reproduce

Steps to reproduce the behavior:

  1. Go to any website that serves different language based on Accept-Language (i.e. outside of any cookie that could store that information)
  2. Set the Accept-Language to an arbitrary language that would request a said version of the website
  3. Notice that it has no effect

Expected behavior Accept-Language should be passed and applied to every Playwright request.

skleeschulte commented 1 year ago

Maybe this helps someone:

I found it hard to understand how this works. This is what I found: