New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: make navigator.userAgentData non-empty #34481
Conversation
This is possibly a preemptive comment, but for my use case, I want the UA header to be identical to Chromium's (and therefore not contain Electron). If you do change this, could you add a way to disable it (or more generally, an API like |
Release Notes Persisted
|
I have automatically backported this PR to "20-x-y", please check out #34524 |
fix: make navigator.userAgentData non-empty (#34481) Co-authored-by: Jeremy Rose <jeremya@chromium.org>
I did test with new BrowserWindow/loadURL to: After this merge the low entropy headers Are working, but only from the second request to origin (after response with "Accept-CH" header) Also, the high entropy headers aren't working at all Electron never sending those, even after response with "Accept-CH" header |
@yellow1234 please file a new bug with a test case, thanks! |
/trop run backport-to 19-x-y |
The backport process for this PR has been manually initiated - sending your PR to |
/trop run backport-to 18-x-y |
The backport process for this PR has been manually initiated - sending your PR to |
I have automatically backported this PR to "19-x-y", please check out #34757 |
I have automatically backported this PR to "18-x-y", please check out #34758 |
/trop run backport-to 17-x-y |
The backport process for this PR has been manually initiated - sending your PR to |
I have automatically backported this PR to "17-x-y", please check out #34760 |
fix: make navigator.userAgentData non-empty (#34481) Co-authored-by: Jeremy Rose <jeremya@chromium.org>
fix: make navigator.userAgentData non-empty (#34481) Co-authored-by: Jeremy Rose <jeremya@chromium.org>
fix: make navigator.userAgentData non-empty (#34481) Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Description of Change
Fixes #30201.
Previously, Electron was always overriding the user-agent string, but not the
user-agent metadata. This resulted in
navigator.userAgentData
being empty,and
Sec-CH-UA
headers not being sent.With this change, the user-agent data is set correctly & should be sent with
Sec-CH-UA
and should be visible innavigator.userAgentData
. One notablefact is that the
brands
field does not containElectron
, onlyChromium
.I'm not sure if this is something we want to change.
Checklist
npm test
passesRelease Notes
Notes: Fixed missing Sec-CH-UA headers and empty navigator.userAgentData.