Skip to content

Commit

Permalink
forward proto scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
nicokant committed Oct 25, 2024
1 parent 049d1b7 commit 832b667
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nginx/maps.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ map $http_upgrade $connection_upgrade {
'' close;
}

map $http_x_forwarded_proto $forwarded_proto {
default $http_x_forwarded_proto;
"" $scheme;
}


upstream django_upstream {
server django:8000;
}
Expand Down Expand Up @@ -35,7 +41,7 @@ server {

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 $scheme;
proxy_set_header X-Forwarded-Proto $forwarded_proto;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Host $http_host;
proxy_set_header Cookie $http_cookie;
Expand Down

0 comments on commit 832b667

Please sign in to comment.