I would like all HTTP traffic to be redirected to HTTPS on my Rails web app deployed on AWS Elastic Beanstalk.
There is a config option for Rails that forces SSL on all connection. The issue is that without modifying the default nginx config on my EB environment, I am getting a redirect loop. Why am I getting infinite redirect loop with force_ssl in my Rails app?
I'm new to EB and I was wondering how I would go about adding in the proxy_set_header X-Forwarded-Proto $scheme; to nginx.conf using .ebextensions configuration files. Do I copy and paste the current nginx.conf file by SSHing into my EC2 instance and add the header? When I navigate to /etc/nginx/nginx.conf, the HTTPS portion of the config file seems to be commented out, even though I enabled it in the AWS web console.