iisurl-rewritingurlrewriter

Remove HTTP headers inserted by Managed Fusion URL Rewriter


I'm toying with Managed Fusion's URL Rewriter and noticed that it adds a couple HTTP headers to IIS’ response:

X-Rewritten-By: ManagedFusion (rewriter; reverse-proxy; +http://managedfusion.com/)
X-ManagedFusion-Rewriter-Version: 3.5

How can I remove these headers? (I'd like to keep things small for performance reasons.)

Unfortunately, the documentation is a little sparse. The configuration example suggests:

    <!--
    This is just a minimal sample configuration file that shows how to declare
    the configuration sections.

    Because an XML Schema Definition (XSD) is generated for each configuration
    section, it should be trivial to edit these files because you have
    IntelliSense on the XML definition.
    -->

However, I'm not seeing any IntelliSense in Visual Studio, so I can't see if this is a configuration option I can stick in my web.config.


Solution

  • Ended up finding the configuration option after perusing the XSD in the source.

    The relevant attribute is allowVanityHeader.

    <managedFusion.rewriter xmlns="http://managedfusion.com/xsd/managedFusion/rewriter">
        <rewriter allowVanityHeader="false" />
    </managedFusion.rewriter>
    

    (Included in the <configuration> node of web.config.)