seuros / capistrano-puma

Puma integration for Capistrano
https://github.com/seuros/capistrano-puma
MIT License
618 stars 301 forks source link

Multiple X-Forwarded-Proto headers causing issues #353

Closed jpatters closed 1 year ago

jpatters commented 2 years 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:

...
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.

github-actions[bot] commented 1 year ago

Stale issue message