Apache Camel - 从 api 响应中删除'Server' http 标头



我有一个应用程序,它使用camel-jetty, camel-cxf来公开REST api,并在apache karaf (fuse esb)中运行。由于安全原因,我需要从API响应中删除"服务器"标头。我从骆驼交换头中删除了头,但它仍然在api响应中返回Jetty(7.6.7.v20120910)。如何从API响应中删除标头?

jetty组件,您可以通过在端点uri中设置sendServerVersion=false来关闭sendServerVersion

对于Apache CXF或camel-cxf,我不确定这是否可能。您需要检查Apache CXF文档。

我在jetty.xml中添加了以下行,并删除了服务器头。

<Set name="sendServerVersion">false</Set>

最新更新