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

Pragmas

Optional command pragmas determine whether conditions break on the first match or proceed. Even a parameter can change its pragma if supported. If the condition of a filter supports pragma, it does also have a default. Most often it breaks. All filters which support conditional and/or pragmas will contain a remark in the description.

  • Pragma:break: Execute the first matching rule.
  • Pragma:continue: Execute all matching rules.

The default depends on the filter's parameters. Not every parameter allows Pragma:continue.

Example 1:

Pragma:break
Condition:HEADER:User-Agent:mozilla.*
YourWishedParameter
DefaultParameter

Explanation: If the user agent contains "mozilla" in its name, the YourWishedParameter will be taken. The DefaultParameter will be skipped.

Example 2:

Pragma:continue
Condition:HEADER:User-Agent:mozilla.*
YourWishedParameter
DefaultParameter

Explanation: If the user agent contains "mozilla" in its name, both the YourWishedParameter and the DefaultParameter will be taken.

Pragma: block-begin/Pragma: block-end If you use the block Pragma: block-begin/Pragma: block-end,all rules inbetween must match the condition. This pragma is only supported by parameters that allow Pragma: continue.

Example 3:

Condition:HEADER:User-Agent:mozilla.*
Pragma: block-begin
YourWishedParameter1
YourWishedParameter2
Pragma: block-end
DefaultParameter