【大拿分享】去哪儿网https改造分享

发布时间:2017-04-05 19:44:07 编辑:站点网
  •        proxy_set_header Host "dujia.qunar.com";
  •         proxy_set_header X-Real-IP$remote_addr;
  •         proxy_set_header X-Forwarded-For$proxy_add_x_forwarded_for;
  •         proxy_set_header dj-sch "https";
  •         proxy_set_header X-Real-Scheme $scheme;
  •         location / {
  •             proxy_pass http://127.0.0.1:80;
  •             #proxy_pass http://p.tuan.qunar.com;
  •         }
  •      }
  • 在java中通过X-Real-Scheme或dj-sch获取当前协议
    •     private static String HTTPS_HEADER = "X-Real-Scheme";
    •     private static String HTTPS_SCHEME = "https";
    •     private static String HTTP_SCHEME = "http";
    •     public static String getScheme(HttpServletRequest request){
      更多相关内容:
        无相关信息
    [!--temp.cy--]