Closed k-toumura closed 3 years ago
Hi @delvedor,
I appreciate you are likely busy, but if you have a moment to look at this and the linked pull request it would help us as we are using it as an upstream dependency for the next Node-RED release as we try and migrate from the request node.
Thanks.
It seems like this issue was closed by #26.
When issuing a request to a proxy, the
Host
header should contain the hostname and port of the destination URL (see RFC7231 Section 4.3.6), but the request issued byhpagent
contain the hostname and port of the proxy.For example, if the proxy address is
proxy.example.com:8080
and the destination URL ishttps://destination.example.org/
, the correct request would be:but
hpagent
issues the wrong request as follows:Suggestion for updates
To make
hpagent
gives the correctHost
headers, update thehpagent
'srequestOptions
(here and here) from:to: