Commit 4dc4fd31 by Kevin Falcone

Sandboxes for ecommerce don't pass along the scheme properly

The nginx config is only configured for prod (when it is behind an ELB
and has http_x_forwarded headers).  We want to pass along the NGINX
headers too (mainly scheme) whcih is what the LMS/CMS does on sandboxes.
parent 15dceca5
......@@ -66,9 +66,15 @@ server {
{% include "robots.j2" %}
location @proxy_to_app {
{% if NGINX_SET_X_FORWARDED_HEADERS %}
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-For $remote_addr;
{% else %}
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header X-Forwarded-Port $http_x_forwarded_port;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
{% endif %}
proxy_set_header Host $http_host;
proxy_redirect off;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment