Open joshuataylor opened 1 month ago
Yeah this seems to be a bug from a super quick look. Wanna give a try to coming up with a patch? 🙃
I guess calling it "preserve host header"/"keep host header" or something would make sense.
Prior art: https://docs.mitmproxy.org/stable/concepts-options/#keep_host_header
Reading: https://hexdocs.pm/mint/Mint.HTTP.html#connect/4-proxying
A minimal example, using mitmproxy:
The raw request seems to be:
When using hackney, this seems to work:
Request:
(HTTPoison also works,
HTTPoison.get("http://example.com", [], [{:proxy, string_url()}])
)Mint.UnsafeProxy: