apache nginx禁用options请求方法
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; }