Goodspeed

导航

asp.net mvc去掉无用的http header

1 X-AspNetMvc-Version
在Global.asax的Application_Start方法中加入

  MvcHandler.DisableMvcResponseHeader = true;

2 X-AspNet-Version

web.config中

<httpRuntime enableVersionHeader="false" />

3 X-Powered-By

web.config中

<httpProtocol>
        <customHeaders>
          <remove name="X-Powered-By" />
        </customHeaders>
 </
httpProtocol>

posted on 2011-06-09 17:26  Goodspeed  阅读(1794)  评论(0编辑  收藏  举报