Deepak Verma
Deepak Verma

Reputation: 446

How to remove http header from Response in WSO2 ESB

I am getting certain http headers in my response. out of those I want to remove one Header 'Server' which is giving information of server which I am using.

Date    Fri, 09 Jan 2015 11:11:17 GMT
Transfer-Encoding   chunked
#status#    HTTP/1.1 200 OK
Content-Type    text/xml;charset=UTF-8
Connection  Keep-Alive
Server  WSO2-PassThrough-HTTP

I have tried to put header mediator with action ='remove' but it is not removed.

please suggest.

Upvotes: 4

Views: 5528

Answers (2)

Hasitha
Hasitha

Reputation: 795

You can use below,

    <property action="remove" name="TRANSPORT_HEADERS" scope="axis2"/>
    <property action="remove" name="EXCESS_TRANSPORT_HEADERS" scope="axis2"/>

This worked for me

Upvotes: 3

Jean-Michel
Jean-Michel

Reputation: 5946

<property name="Server" action="remove" scope="transport"/>

Upvotes: 4

Related Questions