Azure CDN rules engine reference
This article lists detailed descriptions of the available match conditions and features for the Azure Content Delivery Network (CDN) rules engine.
The rules engine is designed to be the final authority on how specific types of requests are processed by the CDN.
- Override or define a custom cache policy.
- Secure or deny requests for sensitive content.
- Redirect requests.
- Store custom log data.
The manner in which special characters are treated varies according to how a match condition or feature handles text values. A match condition or feature may interpret text in one of the following ways:
Text that is interpreted as a literal value treats all special characters, with the exception of the % symbol, as a part of the value that must be matched. In other words, a literal match condition set to
\'*'\ is only satisfied when that exact value (that is,
\'*'\) is found.
A percentage symbol is used to indicate URL encoding (for example,
Text that is interpreted as a wildcard value assigns additional meaning to special characters. The following table describes how the following set of characters is interpreted:
|\||A backslash is used to escape any of the characters specified in this table. A backslash must be specified directly before the special character that should be escaped.
For example, the following syntax escapes an asterisk:
|%||A percentage symbol is used to indicate URL encoding (for example,
|*||An asterisk is a wildcard that represents one or more characters.|
|Space||A space character indicates that a match condition may be satisfied by either of the specified values or patterns.|
|'value'||A single quote does not have special meaning. However, a set of single quotes is used to indicate that a value should be treated as a literal value. It can be used in the following ways:
- It allows a match condition to be satisfied whenever the specified value matches any portion of the comparison value. For example,
- It allows a special character to be specified as a literal character. For example, you may specify a literal space character by enclosing a space character within a set of single quotes (that is,
- It allows a blank value to be specified. Specify a blank value by specifying a set of single quotes (that is, '').
- If the specified value does not contain a wildcard, then it is automatically considered a literal value, which means that it is not necessary to specify a set of single quotes.
- If a backslash does not escape another character in this table, it is ignored when it is specified within a set of single quotes.
- Another way to specify a special character as a literal character is to escape it using a backslash (that is,
Regular expressions define a pattern that is searched for within a text value. Regular expression notation defines specific meanings to a variety of symbols. The following table indicates how special characters are treated by match conditions and features that support regular expressions.
|\||A backslash escapes the character the follows it, which causes that character to be treated as a literal value instead of taking on its regular expression meaning. For example, the following syntax escapes an asterisk:
|%||The meaning of a percentage symbol depends on its usage.
|*||An asterisk allows the preceding character to be matched zero or more times.|
|Space||A space character is typically treated as a literal character.|
|'value'||Single quotes are treated as literal characters. A set of single quotes does not have special meaning.|
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.