Skip to content

Instantly share code, notes, and snippets.

@manojkulkarni30
Last active June 14, 2017 06:03
Show Gist options
  • Save manojkulkarni30/35dae655da821ee129cdef46dd2a5e6f to your computer and use it in GitHub Desktop.
Save manojkulkarni30/35dae655da821ee129cdef46dd2a5e6f to your computer and use it in GitHub Desktop.
Remove Server Response Header In Asp.net Mvc Application
  • Add the below rewrite rule in web.config file.
 <rewrite>
      <outboundRules rewriteBeforeCache="true">
        <rule name="Remove Server header">
          <match serverVariable="RESPONSE_Server" pattern=".+" />
          <action type="Rewrite" value="My Server" />
        </rule>
      </outboundRules>
 </rewrite>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment