咨询热线:4006-75-4006
售前:9:00-23:30 备案:9:00-18:00 技术:7*24h
说明ningx做代理服务器并且设置了https
问题:浏览器打开https://www.landui.com/aaa.html,然后跳转到http://www.landui.com/aaa.html
解决方法1:
在nginx代理中增加一个header,标志用户请求是http还是https,后端获取header决定跳转到http/https页面。这个方法需要修改nginx配置和程序,不推荐,但是可以解决问题。
解决方法2
nginx代理中配置proxy_redirect
proxy_redirect http:// $scheme://;
以上指令会将后端响应header location内容中的http://替换成用户端协议https://。
NGINX访问https跳转到http的解决了