Skip to content

Instantly share code, notes, and snippets.

@cicorias
Created May 26, 2015 15:06
Show Gist options
  • Save cicorias/973120ebdb1dd75603a0 to your computer and use it in GitHub Desktop.
Save cicorias/973120ebdb1dd75603a0 to your computer and use it in GitHub Desktop.
Disabling Headers in Azure Web Apps / Web Sites - or IIS for that matter
<configuration>
<system.webServer>
<security>
<requestFiltering removeServerHeader="true"/>
</security>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
<remove name="X-Cache" />
</customHeaders>
</httpProtocol>
</system.webServer>
<system.web>
<httpRuntime enableVersionHeader="false"/>
</system.web>
</configuration>
@cicorias
Copy link
Author

When running in Azure Web Apps, you may need to disable headers. This config shows how to disable several types. This works for IIS in general too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment