Skip to main content
Version: 3.14.x.x LTS

DynamicConfigFilter

The DynamicConfigFilter can be used to load a filter dynamically on a running instance. The file modification will be checked in the interval configured under periodicity in the Timer section of the navajo.xml file.

Classname
ch::nevis::nevisproxy::filter::dynamic::DynamicConfigFilter
Library
libNPDynamicFilters.so.1
NameType, Usage Constraints, DefaultsDescription
ConfigFilestring requiredThe file where the filter configuration is located. Once the content changes, the configured filter will be reloaded. If the file is empty or contains no filter (), the filter will be unloaded and the request continues in the chain.
ChainFromConfigBuilderClassstring advancedYou should not modify the default entry. Here you define the class which transforms the content of the file into a filter.

For debugging issues, a DumpFilter may be loaded dynamically into a running nevisProxy-instance. For the filter configuration of the DumpFilter to be loaded dynamically, it has to be written into the file configured as ConfigFile in the DynamicConfigFilter. The file must exist on startup, but it can be empty. As soon as the file is modified, it is read by the DynamicConfigFilter and if the configured filter can be loaded successfully, the configured filter in the file is mapped. To remove the DumpFilter from the filter chain again, just remove its configuration from the file, so it is an empty file again.

<filter>
<filter-name>DynamicConfigFilter</filter-name>
<filter-class>ch::nevis::nevisproxy::filter::dynamic::DynamicConfigFilter</filter-class>
<init-param>
<param-name>ConfigFile</param-name>
<param-value>//scripts/DumpFilter.xml</param-value>
</init-param>
</filter>

To load the DumpFilter, just write for.ex. this into the configured ConfigFile:

<filter>
<filter-name>DumpFilter</filter-name>
<filter-class>ch::nevis::isiweb4::filter::debug::DumpFilter</filter-class>

<init-param>
<param-name>DumpDirectory</param-name>
<param-value>//dump</param-value>
</init-param>

<init-param>
<param-name>DumpRequest</param-name>
<param-value>both</param-value>
</init-param>

<init-param>
<param-name>DumpResponse</param-name>
<param-value>both</param-value>
</init-param>

<init-param>
<param-name>MaxRequest</param-name>
<param-value>200</param-value>
</init-param>
</filter>

and this configured DumpFilter will be mapped where the DynamicConfigFilter has been mapped.