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: Inherit browser-level proxy settings from incognito context #7770
Conversation
@@ -319,7 +319,7 @@ export class Browser extends EventEmitter { | |||
async createIncognitoBrowserContext( | |||
options: BrowserContextOptions = {} | |||
): Promise<BrowserContext> { | |||
const { proxyServer = '', proxyBypassList = [] } = options; | |||
const { proxyServer, proxyBypassList } = options; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Omitting the defaults here causes the browser-level settings to be respected if these aren't provided.
) => { | ||
proxiedRequestUrls.push(originalRequest.url as string); | ||
|
||
const proxyRequest = http.request( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creating a simple proxy server which forwards requests on to the TestServer
.
Signed it after opening the PR, seems like updating the status check might require some manual step. |
ca2103c
to
3216302
Compare
Hello guys :) Any news from this PR ? I need it for my project, i cannot upgrade anymore then my pptr version. Thank in advance, |
3216302
to
dfd6284
Compare
dfd6284
to
9a00cc3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the new tests will be failing in Firefox as expected. Could you please add itFailsFirefox
instead of it
for those tests?
9a00cc3
to
52f5956
Compare
52f5956
to
63b69ba
Compare
63b69ba
to
c60315d
Compare
c60315d
to
cad0608
Compare
@jimmydief, closed that issue already. If you need testing on windows, hit me up. |
@iJoris Gotcha, thanks. The only test that was failing was related to |
I can confirm that the proxy server and an createIncognitoBrowserContext do not work after 10.2. Seems that the proxyServer gets ignored in an incognitoBrowserContext. I thought that this PR would resolve this issue tho? Otherwise, I create my own issue. |
bfa5799
to
f9b06de
Compare
f9b06de
to
3cc06e6
Compare
What kind of change does this PR introduce?
This fixes #7589 which was a regression caused by #7516 and released in 10.4.0. It closes #7677 which fixed part of the issue but did not cover the proxy bypass list and also did not include tests.
Did you add tests for your changes?
Yes.
If relevant, did you update the documentation?
N/A
Summary
Browser-level proxy settings are now once again respected when creating new incognito browser contexts. Browser-level settings can be overridden at the context level. Tests were added for request proxy behavior in general.
Does this PR introduce a breaking change?
Nope.
Other information
N/A