当前位置: 代码迷 >> 综合 >> Tomcat配置http强制跳转https
  详细解决方案

Tomcat配置http强制跳转https

热度:68   发布时间:2024-02-27 08:17:02.0

在web.xml文件的最后一个标签下添加

在welcome-file-list标签后加入
<login-config>  <!-- Authorization setting for SSL -->  <auth-method>CLIENT-CERT</auth-method>  <realm-name>Client Cert Users-only Area</realm-name>  </login-config>  <security-constraint>  <!-- Authorization setting for SSL -->  <web-resource-collection >  <web-resource-name >SSL</web-resource-name>  <url-pattern>/*</url-pattern>  </web-resource-collection>  <user-data-constraint>  <transport-guarantee>CONFIDENTIAL</transport-guarantee>  </user-data-constraint>  </security-constraint> 

 

  相关解决方案