I am using the following to redirect all http requests to https requests.
I can see from logs that the header \'x-forwarded-proto\' is never populated and is undefin
You can edit the nginx config file in the EC2 instance. SSH to ec2 instance and follow the following steps
/etc/nginx/conf.d
00_elastic_beanstalk_proxy.conf
sudo vi 00_elastic_beanstalk_proxy.conf
put
location / {
if ($http_x_forwarded_proto != 'https') {
rewrite ^ https://$host$request_uri? permanent;
}
…
}
reload nginx
sudo /usr/sbin/nginx -s reload