nginx 转发https到tomcat,后台request.getRequestURL()只能获取到http
解决方法:
1.nginx增加location块中增加proxy_set_headerX-Forwarded-Proto$scheme; 配置
2.配置Tomcat server.xml 的 Engine 模块下配置一个 Valve:
Xml代码
<ValveclassName="org.apache.catalina.valves.RemoteIpValve"re...
转载
2019-12-09 20:31:42 ·
2373 阅读 ·
0 评论