当前位置:   article > 正文

web.xml中的security-constraint_web.xml security-constraint

web.xml security-constraint
  1. <security-constraint>
  2. <web-resource-collection>
  3. <url-pattern>/*</url-pattern>
  4. <http-method>PUT</http-method>
  5. <http-method>SEARCH</http-method>
  6. <http-method>DELETE</http-method>
  7. <http-method>COPY</http-method>
  8. <http-method>MOVE</http-method>
  9. <http-method>PROPFIND</http-method>
  10. <http-method>PROPPATCH</http-method>
  11. <http-method>MKCOL</http-method>
  12. <http-method>LOCK</http-method>
  13. <http-method>UNLOCK</http-method>
  14. <http-method>HEAD</http-method>
  15. <http-method>OPTIONS</http-method>
  16. <http-method>TRACE</http-method>
  17. <http-method>PATCH</http-method>
  18. </web-resource-collection>
  19. <!-- <auth-constraint>
  20. <role-name>All Role</role-name>
  21. </auth-constraint> -->
  22. </security-constraint>
  23. <login-config>
  24. <auth-method>BASIC</auth-method>
  25. </login-config>

其中的,

  1. <auth-constraint>
  2. <role-name>All Role</role-name>
  3. </auth-constraint>
如果有元素标签auth-constraint时,内容为空时则禁止所有资源访问,无此元素时则security-constraint不起作用

详见其他地方的说明

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Guff_9hys/article/detail/955843
推荐阅读
相关标签
  

闽ICP备14008679号