...
When your proxy is configured with the appropriate headers, can use these headers to determine the protocol, host and port of the original request and send any redirects/forwards to the proper URL. For this configuration, your proxy must add three parameters to the HTTP request forwarded to the server' server:
- X-Forwarded-Protocol: the protocol of the incoming request (http or https).
- X-Forwarded-Host: the host name of the incoming request
- X-Forwarded-Port: the port of the incoming request
...