puppeteer-extra
puppeteer-extra copied to clipboard
fix(plugin-stealth): Append patch version to UA hint platform version
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-UA-Platform-Version
Sec-CH-UA-Platform-Version contains dot-separated major, minor and patch version numbers
The user agent may not contains 3 numbers, example on windows 10 it contains Windows 10.0, so we add the patch version at the end.
Take note that on linux the version seems to contains the kernel version, which this evasion doesn't get so if you set maskLinux
to false on linux, the platformVersion will be empty while it shouldn't.
On android, on my phone on android 11, there is no header Sec-CH-UA-Platform-Version
so i don't know if it must be removed
The bitness is also not filled.
Approved, ping @berstend
Relevant URL: https://chromestatus.com/feature/5080939765956608