Closed jpatters closed 1 year ago
Context: My app is on AWS behind an ELB that does the SSL termination.
Setting nginx_use_ssl causes the nginx config to include the following:
nginx_use_ssl
... proxy_set_header X-Forwarded-Proto $scheme; ... proxy_set_header X-Forwarded-Proto https; ...
The second one should be the only one there since I explicitly told it to use SSL. In reality, the first one takes precedence and causes an infinite redirect because the LB is setting it to http and the rails app is then trying to redirect to https.
http
https
Stale issue message
Context: My app is on AWS behind an ELB that does the SSL termination.
Setting
nginx_use_ssl
causes the nginx config to include the following:The second one should be the only one there since I explicitly told it to use SSL. In reality, the first one takes precedence and causes an infinite redirect because the LB is setting it to
http
and the rails app is then trying to redirect tohttps
.