File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,6 +55,12 @@ http {
5555 '' close;
5656 }
5757
58+ # trust http_x_forwarded_proto headers correctly indicate ssl offloading
59+ map $http_x_forwarded_proto $access_scheme {
60+ default $http_x_forwarded_proto ;
61+ '' $scheme ;
62+ }
63+
5864 {{ $enforceHTTPS := or .deis_router_enforceHTTPS "false" }}
5965
6066 ## start deis-controller
9298 }{{ end }}
9399
94100 {{ if eq $enforceHTTPS "true" }}
95- if ( $http_x_forwarded_proto != "https" ) {
101+ if ( $access_scheme != "https" ) {
96102 rewrite ^( .*) $ https://$host$1 permanent;
97103 }
98104 {{ end }}
@@ -166,7 +172,7 @@ http {
166172 proxy_next_upstream error timeout http_502 http_503 http_504;
167173
168174 {{ if eq $enforceHTTPS "true" }}
169- if ( $http_x_forwarded_proto != "https" ) {
175+ if ( $access_scheme != "https" ) {
170176 rewrite ^( .*) $ https://$host$1 permanent;
171177 }
172178 {{ end }}
You can’t perform that action at this time.
0 commit comments