Access Rule HTTP Headers

Specify regular expressions

Label

Mandatory

Description

HTTP Header

 

HTTP header field whose value is to be evaluated against the regular expression. This is case insensitive.

Example: User-Agent, X-Forwarded-For

Regular Expression

 

Regular expression that is used to check whether a value exists in any of the values specified for the HTTP Header. For multiple comma separated header values, evaluation will be done for each value against the regular expression.

Example: To validate if value contains an IP address within range 192.168.1.1-192.168.1.255
You can either write it simply as "192\.168\.1\.[0-2]?[0-9]{0,2}" or be more precise and specify "192\.168\.1\.((2(([0-4][0-9])|(5[0-5])))|([0-1]?[0-9]{0,2}))" without the quotes.

Example: To validate if user-agent contains Chrome text
You can write it simply as ".*Chrome.*" without the quotes.
Please note that we have added .* because we need to match the entire string which may contain Chrome between other text.
You do not have to specify anything for whitespaces at either end of value as they are trimmed before evaluation.