Skip to main content
Version: 8.2411.x.x RR

FilterMappingFilter

The FilterMappingFilter can set up conditional filter chains, which is very useful if path mapping alone is insufficient.

Classname
ch::nevis::isiweb4::filter::mapping::FilterMappingFilter
Library
libMappingFilters.so.1

Configuration

FilterRules

Type: Newline separated list of conditions and filter names
Usage Constraints: required, conditional
Supported pragmas: break

Map a fixed filter chain conditional based on headers, parameters, attributes and environment variables.

Syntax:
Condition:[<SOURCE>]:<VARIABLE>:<expression>
<filter-name>
Samples
Condition:HEADER:Foo:.*anything.*
aFilterName
Condition:HEADER:Foo:.*other.*
aFilterName anotherFilter

Example

This filter will call LuaFilter2 if the condition doesn't match. If the condition matches, LuaFilter1 will be called. The condition matches if the header "InvokeFilter" begins with Lua.

<filter>
<filter-name>ConditionalFilterChain</filter-name>
<filter-class>ch::nevis::isiweb4::filter::mapping::FilterMappingFilter</filter-class>
<filter-lib>libMappingFilters.so.1</filter-lib>

<init-param>
<param-name>FilterRules</param-name>
<param-value>
Pragma:break
Condition:HEADER:InvokeFilter:PCRE/^Lua/
LuaFilter1
LuaFilter2
</param-value>
</init-param>
</filter>