我使用的是tomcat7,并且我想禁用来自本地主机的SSL流量!并为入站流量启用它。
我已经向web.xml添加了以下配置,它当前将流量从http重定向到https。
<security-constraint>
<web-resource-collection>
<web-resource-name>app</web-resource-name>
<url-pattern>/info</url-pattern>
</web-resource-collection>
<!-- OMIT auth-constraint -->
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>app</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>Role</role-name>
</auth-constraint>
</security-constraint>我在我的服务器上有一个自定义的备份工具,不能使用HTTPs,因此我希望在本地主机上禁用HTPPs。
发布于 2017-08-23 13:05:55
您可以在server.xml文件中的以下行进行注释。
<Connector port="8443" ... SSLEnabled="true" scheme="https" secure="true" sslProtocol="TLS" ... />
希望这能有所帮助!!
发布于 2021-03-17 01:05:25
您可以禁用特定的url,只需在传输保证标签上设置为NONE,请检查Is security-constraint configuration for Tomcat mandatory?
<security-constraint>
<web-resource-collection>
<web-resource-name>securedapp</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>securedapp</web-resource-name>
<url-pattern>/info/*</url-pattern>
<url-pattern>/info2/*</url-pattern>
<url-pattern>/info3/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>https://stackoverflow.com/questions/45830957
复制相似问题