浏览代码

add X-Forwarded-Proto $scheme

cxgreat2014 7 年之前
父节点
当前提交
43cbeda9a0
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      include/nginx.sh

+ 1 - 0
include/nginx.sh

@@ -72,6 +72,7 @@ proxy_set_header Cookie \$http_cookie;
 proxy_set_header Host \$host;
 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;
 EOF
   sed -i "s@/data/wwwroot/default@$wwwroot_dir/default@" $nginx_install_dir/conf/nginx.conf
   sed -i "s@/data/wwwlogs@$wwwlogs_dir@g" $nginx_install_dir/conf/nginx.conf