nginx部署好https后,this.Ctx.Input.IsSecure() 返回 false的
解决方法,nginx的conf中需要加入 proxy_set_header X-Forwarded-Proto $scheme;
location / {
try_files /_not_exists_ @backend;
}
location @backend {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:8083;
}
原文:https://www.cnblogs.com/au_ww/p/15194863.html