我跟随
this
这导致了
this
尝试禁止我的网站接受跟踪方法(动词)。基本上我把下面的部分添加到
<system.webServer>
在web.config(默认网站和其他网站)中:
<security>
<requestFiltering>
<verbs applyToWebDAV="false">
<add verb="TRACE" allowed="false" />
</verbs>
</requestFiltering>
</security>
它没用。然后我转到c:\windows\system32\inetsrv\config\applicationhost.config并替换了里面所有处理程序的动词
<handlers>
. 简而言之,所有的行都是这样的:
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
变成这样:
<add name="StaticFile" path="*" verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
我甚至重新启动了服务器,但是当我检查可用的方法时,跟踪仍然存在:
$ curl -I -X OPTIONS https://example.com/mysite
HTTP/1.1 200 OK
Allow: OPTIONS, TRACE, GET, HEAD, POST
Public: OPTIONS, TRACE, GET, HEAD, POST
X-XSS-Protection: 1; mode=block
Date: Thu, 07 Feb 2019 21:03:49 GMT
Content-Length: 0
那么,我该怎么处理呢?