web.config禁用不需要的http请求谓词
如何配置asp.net的web.config关闭网站不需要的http请求谓词OPTIONS、HEAD、PUT、DELETE、TRACE,CONNECT,只允许GET、POST谓词。
要禁用危险的OPTIONS,TRACE等http请求谓词,给web.config的configuration节点增加下面的配置内容即可。
<system.webServer> <security> <requestFiltering> <verbs allowUnlisted="false" > <add verb="GET" allowed="true" /> <add verb="POST" allowed="true" /> </verbs> </requestFiltering> </security> </system.webServer>
allowUnlisted="false"意思就是拒绝未列出的http请求谓词
加支付宝好友偷能量挖...
原创文章,转载请注明出处:web.config禁用不需要的http请求谓词