You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Reference documentation for Azure CDN rules engine match conditions and features.
4
4
services: cdn
5
5
author: duongau
6
-
6
+
manager: kumudd
7
7
ms.service: azure-cdn
8
8
ms.topic: article
9
-
ms.date: 05/26/2020
9
+
ms.date: 02/27/2023
10
10
ms.author: duau
11
11
12
12
---
13
13
# Azure CDN from Verizon Premium rules engine reference
14
14
15
15
This article lists detailed descriptions of the available match conditions and features for the Azure Content Delivery Network (CDN) [rules engine](cdn-verizon-premium-rules-engine.md).
16
16
17
-
The rules engine is designed to be the final authority on how specific types of requests are processed by the CDN.
17
+
The rules engine is designed to be the final authority on how specific types of requests get processed by the CDN.
18
18
19
19
**Common uses**:
20
20
21
21
- Override or define a custom cache policy.
22
22
- Secure or deny requests for sensitive content.
23
23
- Redirect requests.
24
24
- Store custom log data.
25
+
-
25
26
## Key concepts
26
-
Key concepts for setting up Rules Engine are described below.
27
+
28
+
Key concepts for setting up Rules Engine are described in this article.
29
+
27
30
### Draft
28
-
A draft of a policy consists of one or more rules meant to identify requests and the set of actions that will be applied to them. A draft is a work in progress that allows frequent configuration updates without impacting site traffic. Once a draft is ready to be finalized, it should be converted into a read-only policy.
31
+
32
+
A draft of a policy consists of one or more rules meant to identify requests and the set of actions that gets applied to them. A draft is a work in progress that allows frequent configuration updates without impacting site traffic. Once a draft is ready to be finalized, it should be converted into a read-only policy.
29
33
30
34
### Rule
31
-
A rule identifies one or more types of requests and the set of actions that will be applied to them.
35
+
36
+
A rule identifies one or more types of requests and the set of actions that gets applied to them.
32
37
33
38
It consists of:
34
39
35
40
- A set of conditional expressions that define the logic through which requests are identified.
36
41
- A set of match conditions that define the criteria used to identify requests.
37
-
- A set of features that define how the CDN will handle the above requests.
42
+
- A set of features that define how the CDN handles the above requests.
38
43
These elements are identified in the following illustration.
39
44
40
45

41
46
42
47
### Policy
48
+
43
49
A policy, which consists of a set of read-only rules, provides the means to:
44
50
45
51
- Create, store, and manage multiple variants of your rules.
46
52
- Roll back to a previously deployed version.
47
-
- Prepare event-specific rules in advance (e.g., a rule that redirects traffic as a result of a customer origin maintenance.)
53
+
- Prepare event-specific rules in advance (for example, a rule that redirects traffic as a result of a customer origin maintenance.)
48
54
49
55
> [!NOTE]
50
56
> Although only a single policy per environment is allowed, policies may be deployed as needed.
51
57
52
58
### Deploy request
59
+
53
60
A deploy request provides a simple and streamlined procedure through which a policy may be quickly applied to the Staging or Production environment. A history of deploy requests is provided to facilitate the tracking of changes applied to those environments.
54
61
55
62
> [!NOTE]
56
63
> Only requests that do not pass our automated validation and error detection system will require manual review and approval.
57
64
58
65
### Rule precedence
59
-
The rules contained in a Policy are typically processed in the order in which they are listed (i.e., top to bottom). If the request matches conflicting rules, then the last rule to be processed will take precedence.
66
+
67
+
The rules contained in a Policy are typically processed in the order in which they're listed (for example, top to bottom). If the request matches conflicting rules, then the last rule to be processed takes precedence.
60
68
61
69
### Policy deployment workflow
62
-
The workflow through which a policy may be applied to either the Production or Staging environment is illustrated below.
70
+
71
+
The workflow through which a policy may be applied to either the Production or Staging environment is illustrated as followed.
|[Create Draft](https://docs.vdms.com/cdn/index.html#HRE/AdministeringDraftsandRules.htm#Create)| A draft consists of a set of rules that define how requests for your content should be handled by the CDN. |
77
+
|[Create Draft](https://docs.vdms.com/cdn/index.html#HRE/AdministeringDraftsandRules.htm#Create)| A draft consists of a set of rules that define how requests for your content get handled by the CDN. |
69
78
|Lock Draft | Once a draft has been finalized, it should be locked and converted into a read-only policy. |
70
79
|[Submit Deploy Request](https://docs.vdms.com/cdn/index.html#HRE/DeployRequest.htm)| <br> A deploy request allows a policy to be applied to either test or production traffic.</br> <br>Submit a deploy request to either the Staging or Production environment.</br> |
71
-
|Deploy Request Review | <br>A deploy request undergoes automated validation and error detection.</br><br>Although the majority of deploy requests are automatically approved, manual review is required for more complex policies.</br> |
72
-
|Policy Deployment ([Staging](https://docs.vdms.com/cdn/index.html#HRE/Environment.htm#Staging)) | <br> Upon approval of a deploy request to the Staging environment, a policy will be applied to the Staging environment. This environment allows a policy to be tested against mock site traffic.</br><br>Once the policy is ready to be applied to live site traffic, a new deploy request for the Production environment should be submitted.</br> |
73
-
|Policy Deployment ([Production](https://docs.vdms.com/cdn/index.html#HRE/Environment.htm#Producti)) | Upon approval of a deploy request to the Production environment, a policy will be applied to the Production environment. This environment allows a policy to act as the final authority for determining how the CDN should handle live traffic. |
80
+
|Deploy Request Review | <br>A deploy request undergoes automated validation and error detection.</br><br>Although most deploy requests are automatically approved, manual review is required for more complex policies.</br> |
81
+
|Policy Deployment ([Staging](https://docs.vdms.com/cdn/index.html#HRE/Environment.htm#Staging)) | <br> Upon approval of a deploy request to the Staging environment, a policy is applied to the Staging environment. This environment allows a policy to be tested against mock site traffic.</br><br>Once the policy is ready to be applied to live site traffic, a new deploy request for the Production environment should be submitted.</br> |
82
+
|Policy Deployment ([Production](https://docs.vdms.com/cdn/index.html#HRE/Environment.htm#Producti)) | Upon approval of a deploy request to the Production environment, a policy is applied to the Production environment. This environment allows a policy to act as the final authority for determining how the CDN should handle live traffic. |
74
83
## Syntax
75
84
76
85
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:
@@ -81,33 +90,33 @@ The manner in which special characters are treated varies according to how a mat
81
90
82
91
### Literal values
83
92
84
-
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.
93
+
Text that is interpreted as a literal value treats all special characters, except for 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.
85
94
86
95
A percentage symbol is used to indicate URL encoding (for example, `%20`).
87
96
88
97
### Wildcard values
89
98
90
-
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:
99
+
Text that is interpreted as a wildcard value assigns extra meaning to special characters. The following table describes how the following set of characters is interpreted:
91
100
92
101
Character | Description
93
102
----------|------------
94
103
\ | 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.<br/>For example, the following syntax escapes an asterisk: `\*`
95
104
% | A percentage symbol is used to indicate URL encoding (for example, `%20`).
96
105
\* | An asterisk is a wildcard that represents one or more characters.
97
-
Space | A space character indicates that a match condition may be satisfied by either of the specified values or patterns.
98
-
'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:<br><br/>- It allows a match condition to be satisfied whenever the specified value matches any portion of the comparison value. For example, `'ma'` would match any of the following strings: <br/><br/>/business/**ma**rathon/asset.htm<br/>**ma**p.gif<br/>/business/template.**ma**p<br /><br />- 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, `' '` or `'sample value'`).<br/>- It allows a blank value to be specified. Specify a blank value by specifying a set of single quotes (that is, '').<br /><br/>**Important:**<br/>- 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.<br/>- If a backslash does not escape another character in this table, it is ignored when it is specified within a set of single quotes.<br/>- Another way to specify a special character as a literal character is to escape it using a backslash (that is, `\`).
106
+
Space | A space character indicates that a match condition is satisfied by either of the specified values or patterns.
107
+
'value' | A single quote doesn't 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:<br><br/>- It allows a match condition to be satisfied whenever the specified value matches any portion of the comparison value. For example, `'ma'` would match any of the following strings: <br/><br/>/business/**ma**rathon/asset.htm<br/>**ma**p.gif<br/>/business/template.**ma**p<br /><br />- 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, `' '` or `'sample value'`).<br/>- It allows a blank value to be specified. Specify a blank value by specifying a set of single quotes (that is, '').<br /><br/>**Important:**<br/>- If the specified value doesn't contain a wildcard, then it's automatically considered a literal value, which means that it isn't necessary to specify a set of single quotes.<br/>- If a backslash doesn't escape another character in this table, it's ignored when it's specified within a set of single quotes.<br/>- Another way to specify a special character as a literal character is to escape it using a backslash (that is, `\`).
99
108
100
109
### Regular expressions
101
110
102
-
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.
111
+
Regular expressions define a pattern that is searched for within a text value. Regular expression notation defines specific meanings to various symbols. The following table indicates how special characters get treated by match conditions and features that support regular expressions.
103
112
104
113
Special Character | Description
105
114
------------------|------------
106
115
\ | 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: `\*`
107
116
% | The meaning of a percentage symbol depends on its usage.<br/><br/> `%{HTTPVariable}`: This syntax identifies an HTTP variable.<br/>`%{HTTPVariable%Pattern}`: This syntax uses a percentage symbol to identify an HTTP variable and as a delimiter.<br />`\%`: Escaping a percentage symbol allows it to be used as a literal value or to indicate URL encoding (for example, `\%20`).
108
117
\* | An asterisk allows the preceding character to be matched zero or more times.
109
118
Space | A space character is typically treated as a literal character.
110
-
'value' | Single quotes are treated as literal characters. A set of single quotes does not have special meaning.
119
+
'value' | Single quotes are treated as literal characters. A set of single quotes doesn't have special meaning.
111
120
112
121
Match conditions and features that support regular expressions accept patterns defined by Perl Compatible Regular Expressions (PCRE).
0 commit comments