Defining a Proxy Service Filter
By defining a proxy service filter you can modify the request forwarded by a proxy service in the following ways:
Remove specified header fields (in addition to any header fields removed by the filter defined in
Add specified header fields.
Replace specified strings in the body of the request.
To define a proxy service filter you need to add a configuration file
to one of your configuration layers and add one setting to it:
name is the name of the proxy service for which you want to a filter.
path is the relative path of the configuration file in which the filter is defined.
You can add several such entries, one for each proxy service you want to filter. For example:
You then need to create the actual filter configuration files you have
referenced. In the case of the above example, you would need to create
two files in the same folder as your
A filter configuration file can contain the following settings:
where list is a comma-separated list of header field names that you want to be removed from the request before it is forwarded. This filter is applied in addition to any filter specified in your
name is the name a header field you want to add to the request before it is forwarded
value is the value to be written to the header field
You can specify several such settings in order to add more than one header field to the request.
pattern is a sequence of characters in the request body that are to be replaced.
replacement is the sequence of characters that is to replace pattern.
Only the first occurrence of the specified pattern is replaced.??
Here is an example filter configuration file that:
Removes two headers called
Adds a header called
Replaces the string
credentials-herewith the string
filterHeaders==BadHeader,WorseHeader addHeader.GoodHeader=very.useful.value replaceMapping.credentials-here=verysecretpassword