Skip to content
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(client-certificates): don't use proxy when using BrowserContext.request #31898

Merged
merged 3 commits into from
Jul 29, 2024

Conversation

mxschmitt
Copy link
Member

@mxschmitt mxschmitt commented Jul 29, 2024

Motivation: When using context.request the fetch() call should still use the native TLS options rather than going the proxy route. Before this patch, it used the defaultOptions which contain the socksProxy in the proxy options and it re-used this. this emitted a warning when visiting 127.0.0.1, probably due to an upstream bug:

(node:13882) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permitted by RFC 6066. This will be ignored in a future version.

Probably a regression of TooTallNate/proxy-agents#308.

So based on this it seems fine to ignore the given proxy settings in fetch, if clientCertificates are given. (We would error before when creating the browser context that both is not supported.)

The test changes are needed in order to trigger this warning, which does not get emitted anymore.

mxschmitt and others added 2 commits July 29, 2024 16:24
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
Signed-off-by: Max Schmitt <max@schmitt.mx>

This comment has been minimized.

@mxschmitt mxschmitt merged commit 7e7319d into microsoft:main Jul 29, 2024
29 checks passed
mxschmitt added a commit that referenced this pull request Jul 29, 2024
Copy link
Contributor

Test results for "tests 1"

29212 passed, 694 skipped
✔️✔️✔️

Merge workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants