kudu: outboundRules that modify response headers don't seem to work
The following applicationHost.xdt does not change the Server and X-Powered-By response headers
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<location path="%XDT_SITENAME%" xdt:Transform="InsertIfMissing" xdt:Locator="Match(path)">
<system.webServer xdt:Transform="InsertIfMissing">
<rewrite xdt:Transform="InsertIfMissing">
<outboundRules rewriteBeforeCache="true" xdt:Transform="InsertIfMissing">
<rule name="replace Server header">
<match serverVariable="RESPONSE_Server" pattern=".+" />
<action type="Rewrite" value="" />
</rule>
</outboundRules>
</rewrite>
</system.webServer>
</location>
</configuration>
It seems like it should based on the documentation
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (8 by maintainers)
What you have works fine and can remove various headers generated from the site (e.g. try ETag). But I think these two are special.
Try this completely different xdt (and read this):