6👍
✅
Just add
proxy_set_header X-Forwarded-Proto https;
in your nginx config. Your nginx will always be serving the clients using https as the ELB is configured to receive https
traffic.
Also the reason $scheme
may not have worked is because your nginx is still on http
protocol and not https
protocol
0👍
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
- [Django]-Errors 404 and 500 while access static files in Django
- [Django]-How to install the gviz_api library?
- [Django]-Login and registration form on one page with Django
- [Django]-Django get_object_or_404 is not defined
- [Django]-Django Multiple Levels Choices for Field
Source:stackexchange.com