一、背景
公司進行安全整改,
技術要求:系統軟件所需支撐的WEB容器環境應禁止除GET和POST外其他HTTP(S)方法。
提供憑證:建議在不影響業務的前提下,禁用PUT、DELETE、HEAD、OPTIONS、TRACE等方法。
措施:修改配置,只允許GET、POST方法。
二、技術實現
1、apache:
在httpd.conf中增加,只允許GET、POST方法
<Location "/">
AllowMethods GET POST
</Location>
重啟apache
systemctl restart httpd.service
————————————————
版權聲明:本文為CSDN博主「linwha1990」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/linwha1990/article/details/101771413
2、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>
參考https://blog.csdn.net/wangbiao9292/article/details/90606064
3.weblogic方法
https://www.cnblogs.com/lijingbo/p/8649420.html
參看鏈接: