"Host“ key in http header behind reverse Proxy over UNIX Socket is not available

Hello,

I connect my werbserver with the UNIX Socket to the Rexroth reverse Proxy. The header from each http request is changed from the proxy. Inside the header „Host“ (i.e. https://192.168.1.1:8443) key is not correct available. The „Host“ is needed for redirect to a default page. How can I get the Host from the reverse Proxy?

Is there any other behavior expexted than descriped in the RFC7230 Section 5.4?

https://tools.ietf.org/html/rfc7230#section-5.4

 

Thanks.

Best regards

Best reply by jochen-scheib

Hi,

by default the reverse proxy is not forwarding the headers. But you have several options:

  • Add option "header_upstream" with value "Host {host}" if you only need the host header
  • Add option "transparent" with empty value (""), this will set the following headers:
    • Host, X-Real-IP. X-Forwarded-For, X-Forwarded-Port, X-Forwarded-Proto

You can find an example snap on github, see package-manifest.json 

View original
8 replies