Supressing Server header of HTTP Response on Red Hat JBoss Fuse

Solution Verified - Updated -

Issue

How to suppress "Server: Jetty(7.6.7.v20120910)" http header when returning response?

We use a route like this:

    <camelContext id="TestCamelContext" xmlns="http://camel.apache.org/schema/spring">
        <route id="test_port_route">
            <from uri="jetty:http://0.0.0.0:8443/hello" />
            <setExchangePattern pattern="InOut"/>
            <setBody>
                <constant>hello</constant>
            </setBody>
            <removeHeaders pattern="*" />
        </route>
    </camelContext>

And if I send request to http://localhost:8443/test, reponse contains such http headers

HTTP/1.1 200 OK
Transfer-Encoding: chunked
Server: Jetty(7.6.7.v20120910)

Is there any way to suppress "Server" header using camel 2.10 (JBoss Fuse 6.0)?

  • When a resource is requested from the Web Connector via HTTP, the response contains headers with information about the server. How to remove these headers in 6.3.0 ?

Environment

  • JBoss Fuse
    • 6.0
    • 6.3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content