request.getRequestURL() 获取 http 而不是 https

问题描述 投票:0回答:0

我会知道为什么我的 servlet 中的 request.getRequestURL() 返回 http 而不是 https,即使我用 https 调用它?

在后面我有 tomcat 作为 web 服务器和 haproxy 作为反向代理和负载均衡器 如果有人能告诉我为什么以及如何将 tomcat 或 haproxy 配置为不更改请求,我会查找 proxyPreserveHost 但没有 haproxy 的等效项 非常感谢

tomcat servlets haproxy
© www.soinside.com 2019 - 2024. All rights reserved.