删除 Managed Fusion URL Rewriter 插入的 HTTP 标头

发布于 2024-09-11 08:56:24 字数 931 浏览 6 评论 0原文

我正在使用 Managed Fusion 的 URL Rewriter 并注意到它添加了几个 HTTP 标头IIS 的响应:

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

如何删除这些标头? (出于性能原因,我希望将内容保持得较小。)

不幸的是,文档 有点稀疏。配置示例表明:

    <!--
    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.
    -->

但是,我在 Visual Studio 中没有看到任何 IntelliSense,因此我看不到这是否是我可以粘贴在 web.config 中的配置选项。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夜夜流光相皎洁 2024-09-18 08:56:24

在仔细阅读 XSD 后最终找到了配置选项在源中。

相关属性是allowVanityHeader。

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

(包含在 web.config 的 节点中。)

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.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文