Created
May 26, 2015 15:06
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.