URL matches

Matches when the request URL matches a wildcard pattern or regular expression.

This condition inspects the incoming request URL to determine if it matches the specified criteria. It supports a segmented wildcard interface for common URL structures or a list of regular expressions for complex matching logic.

Configuration

  • Case sensitive: Determines if the comparison ignores character casing. When disabled, the system performs a case-insensitive match against all URL components.
  • Use regular expressions: Whether to enable regular expression matching. When enabled, the input mode switches from segmented wildcard fields to a list of regex patterns.
    • Disabled: Provides separate fields for Scheme, Domain, Path, and Query.
    • Enabled: Provides a list of regex patterns evaluated against the full, normalized, and unescaped unicode URL string.
  • Defined patterns: The list of URL objects. The condition returns true if the request matches any single entry in this list.

Wildcard patterns

When Use regular expressions is disabled, you define a URL structure using these components:

  • Scheme: The protocol, such as http or https. If omitted or set to *, both protocols match.
  • Domain: The requested hostname, such as www.example.com. This field supports wildcards like *.example.com. If omitted, all domains configured for the application match.
  • Path: The resource location, such as /blog/*. If omitted, all paths match.
  • Query: The query string parameters, such as id=*&type=json. If omitted, all query values match.

Measurement

The condition evaluates to true if any single entry in the list evaluates to true.

Wildcard processing

Wildcard matching uses the asterisk (*) as a placeholder for any sequence of characters. The system automatically optimizes the underlying regular expression generation for these segments to minimize CPU overhead.

  • Multi-field matching: All specified fields (Scheme, Domain, Path, and Query) must match simultaneously for that specific object to return true.
  • Omissions: Any field left blank is treated as an implicit wildcard and is considered an automatic match.

Regular expression processing

When enabled, the system evaluates the full URL string against the defined patterns.

  • Dialect: The system uses the RE2 regular expression dialect.
  • Capture groups: Capture groups are assigned to variables $1 through $9, which can be substituted in subsequent actions.
  • Assertions: The system does not add line-begin (^) or line-end ($) assertions automatically; these must be provided explicitly for exact matching.

Performance

  • Sequential validation: Evaluation time increases incrementally with the number of patterns in the list. For requests that do not match any pattern, the system 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.

Last modified March 5, 2026