User agent matches
Matches when the User-Agent request header matches one or more regular expressions.
This condition inspects the User-Agent header of the incoming request to determine if it matches a regular expression
. It returns true if the header value satisfies any of the defined patterns.
Note:
This web control condition is available on both Request and Response web controls.
Configuration
- Case sensitive: Whether to enable case sensitivity during the comparison. When disabled, the condition performs a case-insensitive match against the
User-Agentstring. - Enter your pattern(s): The RE2 regular expression
used to evaluate the
User-Agentstring. Entries should be separated by a new line. - Defined patterns: The list of all active patterns for this condition. The condition returns true if the
User-Agentheader matches any pattern in this list.
Measurement
To evaluate this condition, the proxy extracts the User-Agent header from the incoming request and evaluates it against the Defined patterns.
- Match found: If the header value matches any regular expression in the list, the condition returns true.
- No match found: If the header value matches none of the patterns, the condition returns false.
- Missing header: If the
User-Agentheader is absent from the request, the condition returns false.
Performance
- Sequential validation: Evaluation time increases incrementally with the number of patterns in the list. For requests that do not match any pattern, the proxy must evaluate every entry before returning false.
- Short-circuit optimization: The condition iterates through the list and returns true as soon as the first match is identified. To minimize processing time, place the most frequently matched patterns at the top of the list.
Have questions not answered here?
Contact Support
to get more help.
Last modified on November 18, 2026