We have a HAProxy serving as a load balancer with SSL configured, it's in front of a NGINX serving static files. Apparently NGINX is not inheriting information from X-Forwarded headers set from the upstream HAProxy.
For example:
curl https://[domain]/folder -> HAProxy [ssl] -> NGINX [non-ssl], where /folder is serving an index.html file.
NGINX then performs a 301 redirect to http://[domain]/folder/ and instead it should perform a redirect to https://[domain]/folder/.
In Express.js the trust proxy configuration indicates the app is behind a front-facing proxy, and to use the X-Forwarded-* headers to determine original protocol information.
Is there any similar trust proxy configuration in NGINX?
via Eduardo Lundgren
No comments:
Post a Comment