且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

https重定向代理后面的rails app?

更新时间:2023-09-18 16:10:46

您需要添加以下行:


proxy_set_header X-Forwarded-Proto https;

proxy_set_header X-Forwarded-Proto https;

location / {
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
      proxy_set_header X-Forwarded-Proto https;
      proxy_redirect off;

      if (!-f $request_filename) {
        proxy_pass http://upstreamy;
        break;
      }
 }