Resolution
Configure the proxy server to forward the X-Forwarded-Proto HTTP header.
Generally, you must enable SSL affinity as well. In some proxies, this setting refers to SSL Session Persistence or SSL Persistence.
The following steps are for enabling X-Forward-Proto on an F5 proxy device. For other devices, you might need to modify these steps and settings.
- In a custom HTTP profile applied to the virtual server, use Insert header:
- For HTTPS virtuals, insert X-Forwarded-Proto with a value of https.
- For HTTP virtuals, insert X-Forwarded-Proto with a value of http.
- Apply an iRule to the Virtual Server. A typical example of this would be:
HTTP::header insert X-Forwarded-Proto https}
when HTTP_REQUEST { HTTP::header insert X_FORWARDED_PROTO https }
OR:
when HTTP_REQUEST { HTTP::redirect https://\[HTTP::host\]\[HTTP::uri\] }