hyper-reverse-proxy
hyper-reverse-proxy copied to clipboard
Host header is missing the port
The host
header that is set by the proxy does not include the port.
The easiest fix is to just remove the host
header as it will be automatically set by the client when sending the request:
https://github.com/hyperium/hyper/blob/4fcfe1f4ba461209483dec960e36293459a1c60a/src/client/client.rs#L250
Should host
be the host of the target or host of the reverseproxy?
From reading https://www.rfc-editor.org/rfc/rfc7230#section-5.4, my understanding is that a proxy needs to replace the host header with the name of the host to which it makes the request.
The X-Forwarded-Host
can be used to find out the host of the original request.
Feels weird, but totally agree