-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
100e842
commit 1ed5ff6
Showing
1 changed file
with
23 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,27 @@ | ||
# Remove Custom Headers | ||
|
||
Removes custom HTTP Response headers for Azure App Service web applications including Server, X-Powered-By, X-AspNet-Version and X-AspNetMvc-Version. | ||
Removes custom HTTP response headers for Azure App Service web applications including `Server`, `X-Powered-By`, `X-AspNet-Version` and `X-AspNetMvc-Version`. | ||
|
||
https://www.siteextensions.net/packages/RemoveCustomHeaders | ||
|
||
# How does it work? | ||
|
||
This extension is just a simple wrapper over the following `ApplicationHost.xdt` file: | ||
|
||
'''xml | ||
<?xml version="1.0"?> | ||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> | ||
<system.webServer> | ||
<httpProtocol> | ||
<customHeaders> | ||
<add xdt:Transform="Remove" /> | ||
</customHeaders> | ||
</httpProtocol> | ||
<security> | ||
<requestFiltering removeServerHeader="true" xdt:Transform="SetAttributes(removeServerHeader)" /> | ||
</security> | ||
</system.webServer> | ||
</configuration> | ||
``` | ||
These transform files are the supported way of allowing you to modify the default `ApplicationHost.config` file. |