web-applications - 如何避免重定向到 SSL 端口

标签 web-applications ssl ssl-certificate tomcat6 web.xml

我的 SSL 配置 Web 应用程序(部署在 tomcat(8080 端口))中的 Web.xml 配置如下

<security-constraint>
    <web-resource-collection>
        <web-resource-name>HTTPSOnly</web-resource-name>
        <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <user-data-constraint>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
</security-constraint>

当我尝试 https://google.com , 我正在获取页面 当我尝试 http://google.com ,它会自动重定向到 https://google.com:8443 .所以我没有收到该页面。

我希望它重定向到 https://google.com而不是 https://google.com:8443 .

请帮助我。如果您需要任何进一步的详细信息,会通知您。

最佳答案

我明白了。 从 tomcat 的 server.xml 中删除了 SSL redirectPort

<Connector port="8080" protocol="HTTP/1.1" 
connectionTimeout="20000" redirectPort="8443" />

喜欢,

<Connector port="8080" protocol="HTTP/1.1" 
connectionTimeout="20000" />

关于web-applications - 如何避免重定向到 SSL 端口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14643441/

相关文章:

javascript - 渐进式 Web 应用程序和缓存 UI

windows - 适用于 Windows 的 CouchDB - SSL 证书 - 连接错误

javascript - 在 Chrome 扩展程序中获取当前页面 SSL 证书的指纹

java - Tomcat SSL : unable to find valid certification path to requested target

java - Screentoaster,他们是怎么做到的?

csv - flask pythonanywhere服务器中的文件结构?

java - 使用 Google Apps Engine 发送邮件

c# - 应用程序服务器上安装的 IBM MQ .Net 客户端使用什么证书名称?

ssl - 开启 TLS 1.2

ssl-certificate - aiohttp 如何检索对等证书?