Incorrect "Host" header being forwarded in Selenium requests
Closed this issue · 5 comments
kuangp commented
I believe WebdriverProxy
is incorrectly forwarding the Host
header from originalRequest
here: https://github.com/angular/blocking-proxy/blob/master/lib/webdriver_proxy.ts#L52
The headers from originalRequest
includes the Host
header which is set to the host of the blocking proxy server (eg. localhost:xxxxx
). When this forwarded along in the request to selenium, some selenium servers can reject the request since the Host is unknown. I believe this should be explicitly omitted from options.headers
so it will corrected be inserted by Node Http.
heathkit commented
Thanks, I think you're right. I'm a little busy, but I'd welcome a PR to
fix this.
…On Thu, Mar 5, 2020 at 8:44 AM kuangp ***@***.***> wrote:
I believe WebdriverProxy is incorrectly forwarding the Host header from
originalRequest here:
https://github.com/angular/blocking-proxy/blob/master/lib/webdriver_proxy.ts#L52
The headers from originalRequest includes the Host header which is set to
the host of the blocking proxy server (eg. localhost:xxxxx). When this
forwarded along in the request to selenium, some selenium servers can
reject the request since the Host is unknown. I believe this should be
explicitly omitted from options.headers so it will corrected be inserted
by Node Http.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#44?email_source=notifications&email_token=AAACKRZI472D4BB62M76KRDRF7JIXA5CNFSM4LCN7ON2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IS2765A>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACKR7ENKS3M3C2V2CPA3LRF7JIXANCNFSM4LCN7ONQ>
.
kuangp commented
@heathkit I put up the linked PR, please take a look when you get a chance. Thanks!