headerFilter
Removes message headers matching a list of patterns.
Can be used in
proxy, serviceProxy, soapProxy, transport
Syntax
<headerFilter> [<include>pattern</include> | <exclude>pattern</exclude>]... </headerFilter>
Sample
In the example, only headers starting with Content or the Location header will be kept; all others will be removed from requests and responses.
<serviceProxy port="80"> <headerFilter> <include>Content.*<include> <include>Location<include> <exclude>.*<exclude> </headerFilter> <target host="www.membrane-soa.org" /> </serviceProxy>
Child Elements
Name | Cardinality | Description |
---|---|---|
include | 0..* | Contains a Java regex for including message headers. |
exclude | 0..* | Contains a Java regex for excluding message headers. |
The first matching child element will be acted upon by the filter.
Flow
This interceptor is by default applied to both requests and responses. By wrapping it in an <request>...</request> (or <response>...</response>) element, you can select to apply it only to requests (or only to responses). See request and response.