繁体   English   中英

可以在我的网站中覆盖 applicationhost.config 中 http 动词的 RequestFiltering 值吗?

[英]RequestFiltering value for http verbs in applicationhost.config can be overridden in my websites?

如果 http OPTIONS 已经在 applicationhost.config 中配置为 [OPTIONS=false],那么在 web.conig 中配置 http [OPTIONS=true] 时,我的网站会发生什么?

ApplicationHostFile => 添加 http OPTIONS = false 我的网站级别 web.config => 添加 http OPTIONS = true

哪一个会优先? & 在启动我的网站时会遇到任何问题 [服务器错误]?

[例如:如果在 applicationhost.config 中添加 http 响应标头,我们将收到错误消息,提示“不允许重复”。因此,当两个文件具有相同的标头时,我们会收到 RequestFiltering http 动词的任何错误?]

如果在 Applicatiohost.config 文件中配置了 HTTP 动词,例如,

<system.webServer>
   <security>
    <requestFiltering>
      <verbs allowUnlisted="true" applyToWebDAV="true">
         <add verb="OPTIONS" allowed="false" />
      </verbs>
     </requestFiltering>
   </security>
 </system.webServer>

这可以在我们的网站 web.config 部分中通过配置来覆盖,

<system.webServer>
   <security>
    <requestFiltering>
      <verbs>
         <remove verb="OPTIONS" />
         <add verb="OPTIONS" allowed="false" />
      </verbs>
     </requestFiltering>
   </security>
 </system.webServer>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM