소스 검색

Set proper X-Forwarded-Ssl for SSL-terminated setups

Sergey Besedin 7 년 전
부모
커밋
330d2cdc0e
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      nginx.tmpl

+ 2 - 2
nginx.tmpl

@@ -51,8 +51,8 @@ server_names_hash_bucket_size 128;
 ssl_dhparam /etc/nginx/dhparam/dhparam.pem;
 ssl_dhparam /etc/nginx/dhparam/dhparam.pem;
 {{ end }}
 {{ end }}
 
 
-# Set appropriate X-Forwarded-Ssl header
-map $scheme $proxy_x_forwarded_ssl {
+# Set appropriate X-Forwarded-Ssl header based on $proxy_x_forwarded_proto
+map $proxy_x_forwarded_proto $proxy_x_forwarded_ssl {
   default off;
   default off;
   https on;
   https on;
 }
 }