邮箱:4867443@qq.com
手机:18085674061
电话:0856-5202348
地址:铜仁市大数据产业园13楼
发布时间:2020-07-09
1、apache禁用options方法
方法一:使用apache write模块
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS)
RewriteRule .* - [F]
但这种情况有一个问题,因为有些apache可能会没有开启rewrite模块可以通过方法二实现。
方法二:通过location方法实现
<Location />
<Limit OPTIONS>
Deny from all
</Limit>
</Location>
2、nginx禁用option方法,将下面语句添加到nginx.conf文件或者server模块中
if
($request_method ~* OPTIONS) {
return
404;
}
免费注册:https://www.50yun.net/col-reg/
相关推荐
截屏,微信识别二维码
微信号:trxianglei
(点击微信号复制,添加好友)