Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0266e8a

Browse files
author
Maxwell Gattuso
committedNov 1, 2019
updating for rules engine
1 parent 4c793fa commit 0266e8a

File tree

9 files changed

+468
-0
lines changed

9 files changed

+468
-0
lines changed
 

‎articles/cdn/TOC.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
href: cdn-custom-ssl.md
2727
- name: Set caching rules
2828
href: cdn-caching-rules-tutorial.md
29+
- name: Enforce HTTPS using Standard Rules Engine
30+
href: cdn-standard-rules-engine.md
2931
- name: Samples
3032
items:
3133
- name: Code samples
@@ -134,6 +136,13 @@
134136
href: cdn-troubleshoot-allowed-ca.md
135137
- name: Reference
136138
items:
139+
- name: Microsoft Standard rules engine reference
140+
href: cdn-standard-rules-engine-reference.md
141+
items:
142+
- name: Standard Rules engine match conditions
143+
href: cdn-standard-rules-engine-match-conditions.md
144+
- name: Standard Rules engine actions
145+
href: cdn-standard-rules-engine-actions.md
137146
- name: Verizon Premium rules engine reference
138147
href: cdn-verizon-premium-rules-engine-reference.md
139148
items:
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
---
2+
title: Azure CDN from Microsoft Standard Rules Engine actions | Microsoft Docs
3+
description: Reference documentation for Azure CDN from Microsoft Standard Rules Engine actions.
4+
services: cdn
5+
author: mdgattuso
6+
7+
ms.service: azure-cdn
8+
ms.topic: article
9+
ms.date: 11/01/2019
10+
ms.author: magattus
11+
12+
---
13+
14+
# Azure CDN from Microsoft Standard Rules Engine actions
15+
16+
This article lists detailed descriptions of the available actions for Azure Content Delivery Network (CDN) from Microsoft [Standard Rules Engine](cdn-standard-rules-engine.md).
17+
18+
The second part of a rule is an action. An action defines the behavior that is applied to the request type that is identified by a set of match conditions.
19+
20+
## Actions
21+
22+
## Cache Expiration
23+
24+
This action allows you to overwrite the TTL of the endpoint for requests specified by the rules match conditions.
25+
26+
**Required fields**
27+
Cache Behavior |
28+
---------------|----------------
29+
Bypass Cache | When this option is selected and the rule matches, the content will not be cached.
30+
Override | When this option is selected and the rule matches, the TTL value returned from origin will be overwritten with the value specified in the action.
31+
Set if missing | When this option is selected and the rule matches, if there was no TTL value returned from origin, the rule will set the TTL to the value specified in the action.
32+
33+
**Additonal fields**
34+
Days | Hours | Minutes | Seconds
35+
-----|-------|---------|--------
36+
Int | Int | Int | Int
37+
38+
## Cache Key query string
39+
40+
This action allows you to modify the cache key based on query strings.
41+
42+
**Required fields**
43+
Behavior | Description
44+
---------|------------
45+
Include | When this option is selected and the rule matches, query strings specified in the parameters will be included when generating the cache key.
46+
Cache every unique URL | When this option is selected and the rule matches, each unique URL will have its own cache key.
47+
Exclude | When this option is selected and the rule matches, query strings specified in the parameters will be excluded when generating the cache key.
48+
Ignore query strings | When this option is selected and the rule matches, query strings will not be considered when generating the cache key.
49+
50+
## Modify Request header
51+
52+
This action allows you to modify headers present in requests sent to your origin.
53+
54+
**Required fields**
55+
Action | HTTP Header Name | Value
56+
-------|------------------|------
57+
Append | When this option is selected and the rule matches, the header specified in Header name will be added to the request with the specified Value. If the header is already present, the Value will be appended to the existing value. | String
58+
Overwrite | When this option is selected and the rule matches, the header specified in Header name will be added to the request with the specified Value. If the header is already present, the Value will overwrite the existing value. | String
59+
Delete | When this option is selected and the rule matches, and the header specified in the rule is present, it will be deleted from the request. | String
60+
61+
## Modify Response header
62+
63+
This action allows you to modify headers present in responses returned to your end clients
64+
65+
**Required fields**
66+
Action | HTTP Header Name | Value
67+
-------|------------------|------
68+
Append | When this option is selected and the rule matches, the header specified in Header name will be added to the response with the specified Value. If the header is already present, the Value will be appended to the existing value. | String
69+
Overwrite | When this option is selected and the rule matches, the header specified in Header name will be added to the response with the specified Value. If the header is already present, the Value will overwrite the existing value. | String
70+
Delete | When this option is selected and the rule matches, and the header specified in the rule is present, it will be deleted from the response. | String
71+
72+
## URL Redirect
73+
74+
This action allows you to redirect end clients to a new URL.
75+
76+
**Required fields**
77+
Field | Description
78+
------|------------
79+
Type | Select the response type that will be returned to the requestor. Options are - 302 Found, 301 Moved, 307 Temporary redirect, and 308 Permanent redirect
80+
Protocol | Match Request, HTTP, or HTTPS
81+
Hostname | Select the hostname the request will be redirected to. Leave empty to preserve the incoming host.
82+
Path | Define the path to be used in the redirect. Leave empty to preserve the incoming path.
83+
Query String | Define the query string used in the redirect. Leave empty to preserve the incoming query string.
84+
Fragment | Define the fragment to be used in the redirect. Leave empty to preserve the incoming fragment.
85+
86+
It is highly recommended to use an absolute URL. The use of a relative URL may redirect CDN URLs to an invalid path.
87+
88+
## URL Rewrite
89+
90+
This action allows you to rewrite the path of a request en route to your origin.
91+
92+
**Required fields**
93+
Field | Description
94+
------|------------
95+
Source Pattern | Define the source pattern in the URL path to replace. Currently, source pattern uses a prefix-based match. To match all URL paths, use “/” as the source pattern value.
96+
Destination | Define the destination path for be used in the rewrite. This will overwrite the source pattern
97+
Preserve unmatched path | If Yes, the remaining path after the source pattern will be appended to the new destination path.
98+
99+
100+
[Back to top](##actions)
101+
102+
</br>
103+
104+
## Next steps
105+
106+
- [Azure Content Delivery Network overview](cdn-overview.md)
107+
- [Rules engine reference](cdn-standard-rules-engine-reference.md)
108+
- [Rules engine match conditions](cdn-standard-rules-engine-match-conditions.md)
109+
- [Enforce HTTPS using the Standard Rules Engine](cdn-standard-rules-engine.md)
Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
---
2+
title: Azure CDN from Microsoft Standard Rules Engine match conditions | Microsoft Docs
3+
description: Reference documentation for Azure Content Delivery Network from Microsoft Standard Rules Engine match conditions.
4+
services: cdn
5+
author: mdgattuso
6+
7+
ms.service: azure-cdn
8+
ms.topic: article
9+
ms.date: 11/01/2019
10+
ms.author: magattus
11+
12+
---
13+
14+
# Azure CDN from Microsoft Standard Rules Engine match conditions
15+
16+
This article lists detailed descriptions of the available match conditions for the Azure Content Delivery Network (CDN) from Microsoft [Standard Rules Engine](cdn-standard-rules-engine.md).
17+
18+
The first part of a rule is a set of match conditions. Each rule may have up to 4 match conditions. A match condition identifies specific types of requests for which the actions definied in the rule will be performed. If you use multiple match conditions, they will be grouped together using AND logic.
19+
20+
For example, you can use a match condition to:
21+
22+
- Filter requests generated from a particular IP address or country/region.
23+
- Filter requests by header information.
24+
- Filter requests from Mobile or Desktop devices.
25+
26+
## Match Conditions
27+
28+
### Device type
29+
30+
The Device type match condition identifies requests made from a mobile or desktop device based on its properties.
31+
32+
**Required fields**
33+
Operator | Supported Value
34+
---------|----------------
35+
Equals, Not equals | Mobile, Desktop
36+
37+
38+
### HTTP Version
39+
40+
The HTTP Version match condition identifies requests based on the HTTP version the request arrives with.
41+
42+
**Required fields**
43+
Operator | Supported Value
44+
---------|----------------
45+
Equals, Not equals | 2.0, 1.1, 1.0, 0.9, All
46+
47+
48+
### Request cookies
49+
50+
The Request cookies match condition identifies requests based on cookie information in the incoming request.
51+
52+
**Required fields**
53+
Cookie Name | Operator | Cookie Value | Case Transform
54+
------------|----------|--------------|---------------
55+
String | [Standard operator list](###standard-operator-list) | String, Int | No transform, to uppercase, to lowercase
56+
57+
Key information
58+
- Wildcard values, including asterisks (*), are not supported when specifying a cookie name, only exact cookie name matches are eligible for comparison.
59+
- Only a single cookie name can be specified per instance of this match condition.
60+
- Cookie name comparisions are case-insensitive.
61+
- Specifiy multiple cookie values by delimiting each one with a single space.
62+
- Cookie values can take advantage of wildcard values.
63+
- If a wildcard value has not been specified, only an exact match will satisfy this match condition. For example, specifying "Value" will match "Value", but not "Value1".
64+
65+
### Post Argument
66+
67+
**Required fields**
68+
Argument Name | Operator | Argument Value | Case Transform
69+
--------------|----------|----------------|---------------
70+
String | [Standard operator list](###standard-operator-list) | String, Int | No transform, to uppercase, to lowercase
71+
72+
### Query String
73+
74+
The Query String match conditions identifies requests containing a specified query string parameter. This parameter is set to a value that matches a specified pattern. Query string parameters (for example, parameter=value) in the request URL determine whether this condition is met. This match condition identifies a query string parameter by its name and accepts one or more values for the parameter value.
75+
76+
**Required fields**
77+
Operator | Query String | Case Transform
78+
---------|--------------|---------------
79+
[Standard operator list](###standard-operator-list) | String, Int | No transform, to uppercase, to lowercase
80+
81+
### Remote Address
82+
83+
The Remote address match condition identify requests based on the requester's location or IP address.
84+
85+
**Required fields**
86+
Operator | Supported Values
87+
---------|-----------------
88+
Any | N/A
89+
Geo Match | Country codes
90+
IP Match | IP addresses (space seperated)
91+
Not Any | N/A
92+
Not Geo Match | Country codes
93+
Not IP Match | IP addresses (space seperated)
94+
95+
Key information:
96+
97+
- Use CIDR notation.
98+
- Specify multiple IP addresses and/or IP address blocks by delimiting each one with a single space. For example:
99+
- **IPv4 example**: 1.2.3.4 10.20.30.40 matches any requests that arrive from either address 1.2.3.4 or 10.20.30.40.
100+
- **IPv6 example**: 1:2:3:4:5:6:7:8 10:20:30:40:50:60:70:80 matches any requests that arrive from either address 1:2:3:4:5:6:7:8 or 10:20:30:40:50:60:70:80.
101+
- The syntax for an IP address block is the base IP address followed by a forward slash and the prefix size. For example:
102+
- **IPv4 example**: 5.5.5.64/26 matches any requests that arrive from addresses 5.5.5.64 through 5.5.5.127.
103+
- **IPv6 example**: 1:2:3:/48 matches any requests that arrive from addresses 1:2:3:0:0:0:0:0 through 1:2:3:ffff:ffff:ffff:ffff:ffff.
104+
105+
### Request Body
106+
107+
**Required fields**
108+
Operator | Request Body | Case Transform
109+
---------|--------------|---------------
110+
[Standard operator list](###standard-operator-list) | String, Int | No transform, to uppercase, to lowercase
111+
112+
### Request Header
113+
114+
**Required fields**
115+
Header Name | Operator | Header Value | Case Transform
116+
------------|----------|--------------|---------------
117+
String | [Standard operator list](###standard-operator-list) | String, Int | No transform, to uppercase, to lowercase
118+
119+
### Request Method
120+
121+
**Required fields**
122+
Operator | Supported Value
123+
---------|----------------
124+
Equals, Not equals | GET, POST, PUT, DELETE, HEAD, OPTIONS, TRACE
125+
126+
Key information:
127+
128+
- Only the GET request method can generate cached content on the CDN. All other request methods are proxied through the network.
129+
130+
### Request Protocol
131+
132+
**Required fields**
133+
Operator | Supported Value
134+
---------|----------------
135+
Equals, Not equals | HTTP, HTTPS
136+
137+
### Request URL
138+
139+
**Required fields**
140+
Operator | Request URL | Case Transform
141+
---------|-------------|---------------
142+
[Standard operator list](###standard-operator-list) | String, Int | No transform, to uppercase, to lowercase
143+
144+
Key information:
145+
146+
- When entering Request URL, ensure you include protocol information. For example "https://www.[yourdomain].com"
147+
148+
### URL File Extension
149+
150+
**Required fields**
151+
Operator | Extension | Case Transform
152+
---------|-----------|---------------
153+
[Standard operator list](###standard-operator-list) | String, Int | No transform, to uppercase, to lowercase
154+
155+
Key information:
156+
157+
- For extension, do not include a leading period; for example, use html instead of .html.
158+
159+
### URL File Name
160+
161+
**Required fields**
162+
Operator | File name | Case Transform
163+
---------|-----------|---------------
164+
[Standard operator list](###standard-operator-list) | String, Int | No transform, to uppercase, to lowercase
165+
166+
Key information:
167+
168+
- To specify multiple file names, separate each file name with a single space.
169+
170+
### URL Path
171+
172+
**Required fields**
173+
Operator | Value | Case Transform
174+
---------|-------|---------------
175+
[Standard operator list](###standard-operator-list) | String, Int | No transform, to uppercase, to lowercase
176+
177+
Key information:
178+
179+
- A file name value can take advantage of wildcard values. For example, each file name pattern can consist of one or more asterisks (*), where each asterisk matches a sequence of one or more characters.
180+
181+
## Reference for rules engine match conditions
182+
183+
### Standard Operator List
184+
185+
For rules that contain the standard operator list, the following operators are valid:
186+
187+
- Any
188+
- Equals
189+
- Contains
190+
- Begins with
191+
- Ends with
192+
- Less than
193+
- Less than or equals
194+
- Greater than
195+
- Greater than or equals
196+
- Not any
197+
- Not contains
198+
- Not begins with
199+
- Not ends with
200+
- Not less than
201+
- Not less than or equals
202+
- Not greater than
203+
- Not greater than or equals
204+
205+
For numeric operators, like "Less than" or "Greater than or equals", the comparison used will based on length. In this case, the value in the match condition should be an Integer, equal to the length you would like to compare.
206+
207+
---
208+
209+
[Back to top](#match-conditions)
210+
211+
</br>
212+
213+
## Next steps
214+
215+
- [Azure Content Delivery Network overview](cdn-overview.md)
216+
- [Rules engine reference](cdn-standard-rules-engine-reference.md)
217+
- [Rules engine actions](cdn-standard-rules-engine-actions.md)
218+
- [Enforce HTTPS using the Standard Rules Engine](cdn-standard-rules-engine.md)

0 commit comments

Comments
 (0)