您的位置:首页 > 运维架构 > 网站架构

网站漏洞解决-[轻微]WEB服务器启动了OPTIONS方法

2017-11-01 13:30 337 查看
解决方法:

使所有项目都执行,修改tomcat配置文件web.xml,添加如下代码:

<security-constraint>
<web-resource-collection>
<url-pattern>/*</url-pattern>
<http-method>PUT</http-method>
<http-method>DELETE</http-method>
<http-method>HEAD</http-method>
<http-method>OPTIONS</http-method>
<http-method>TRACE</http-method>
</web-resource-collection>
<auth-constraint>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
若只想某个项目使用,只需要在该项目的web.xml文件添加上述代码。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐