如果你的webapp需要只能够进行https方式访问,那么在webapp的web.xml里加上
- <security-constraint>
- <web-resource-collection>
- <web-resource-name>must https</web-resource-name>
- <url-pattern>/lizongbo/*</url-pattern>
- </web-resource-collection>
- <user-data-constraint>
- <transport-guarantee>CONFIDENTIAL</transport-guarantee>
- </user-data-constraint>
- </security-constraint>
本文介绍了一种在webapp中仅允许通过HTTPS访问的方法,在web.xml文件中设置特定的约束来确保所有请求都是安全的。
1万+

被折叠的 条评论
为什么被折叠?



