Skip to content

Commit 6482d32

Browse files
authored
Merge pull request #112275 from megan-beatty/master
First Draft of Rules Engine Documentation
2 parents 9e945b5 + 3c0e651 commit 6482d32

15 files changed

+541
-1
lines changed

articles/frontdoor/TOC.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
- name: Overview
44
items:
55
- name: What is Azure Front Door?
6-
href: front-door-overview.md
6+
href: front-door-overview.md
7+
- name: What's new in Azure Front Door
8+
href: front-door-whats-new.md
79
- name: Quickstarts
810
expanded: true
911
items:
@@ -17,6 +19,8 @@
1719
href: front-door-custom-domain-https.md
1820
- name: Set up a geo-filtering policy for your Front Door
1921
href: front-door-tutorial-geo-filtering.md
22+
- name: Set up a Rules Engine
23+
href: front-door-tutorial-rules-engine.md
2024
- name: Samples
2125
items:
2226
- name: Resource Manager Templates
@@ -53,6 +57,12 @@
5357
href: front-door-url-redirect.md
5458
- name: Wildcard domain
5559
href: front-door-wildcard-domain.md
60+
- name: Rules Engine
61+
href: front-door-rules-engine.md
62+
- name: Rules Engine Match Conditions
63+
href: front-door-rules-engine-match-conditions.md
64+
- name: Rules Engine Actions
65+
href: front-door-rules-engine-actions.md
5666
- name: How-to guides
5767
items:
5868
- name: Redirect Traffic
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
title: Azure Front Door | Microsoft Docs
3+
description: This article provides an overview of Azure Front Door. Find out if it is the right choice for load-balancing user traffic for your application.
4+
services: frontdoor
5+
documentationcenter: ''
6+
author: megan-beatty
7+
editor: ''
8+
ms.service: frontdoor
9+
ms.devlang: na
10+
ms.topic: overview
11+
ms.tgt_pltfrm: na
12+
ms.workload: infrastructure-services
13+
ms.date: 4/30/2020
14+
ms.author: mebeatty
15+
# customer intent: As an IT admin, I want to learn about Front Door and what new features are available.
16+
---
17+
18+
# Azure Front Door Rules Engine Actions
19+
20+
In [AFD Rules Engine](front-door-rules-engine.md) a rule consists of zero or more match conditions and actions. This article provides detailed descriptions of the actions you can use in AFD Rules Engine.
21+
22+
An action defines the behavior that's applied to the request type that a match condition or set of match conditions identifies. In AFD Rules Engine, a rule can contain up to five actions, only one of which may be a route configuration override action (forward or redirect).
23+
24+
The following actions are available to use in Azure Front Door rules engine.
25+
26+
## Modify request header
27+
28+
Use this action to modify headers that are present in requests sent to your origin.
29+
30+
### Required fields
31+
32+
Action | HTTP header name | Value
33+
-------|------------------|------
34+
Append | When this option is selected and the rule matches, the header specified in **Header name** is added to the request with the specified value. If the header is already present, the value is appended to the existing value. | String
35+
Overwrite | When this option is selected and the rule matches, the header specified in **Header name** is added to the request with the specified value. If the header is already present, the specified value overwrites the existing value. | String
36+
Delete | When this option is selected, the rule matches, and the header specified in the rule is present, the header is deleted from the request. | String
37+
38+
## Modify response header
39+
40+
Use this action to modify headers that are present in responses returned to your clients.
41+
42+
### Required fields
43+
44+
Action | HTTP Header name | Value
45+
-------|------------------|------
46+
Append | When this option is selected and the rule matches, the header specified in **Header name** is added to the response by using the specified **Value**. If the header is already present, **Value** is appended to the existing value. | String
47+
Overwrite | When this option is selected and the rule matches, the header specified in **Header name** is added to the response by using the specified **Value**. If the header is already present, **Value** overwrites the existing value. | String
48+
Delete | When this option is selected, the rule matches, and the header specified in the rule is present, the header is deleted from the response. | String
49+
50+
## Route configuration overrides
51+
52+
### Route Type: Redirect
53+
54+
Use this action to redirect clients to a new URL.
55+
56+
#### Required fields
57+
58+
Field | Description
59+
------|------------
60+
Redirect Type | Select the response type to return to the requestor: Found (302), Moved (301), Temporary redirect (307), and Permanent redirect (308).
61+
Redirect protocol | Match Request, HTTP, HTTPS.
62+
Destination host | Select the host name you want the request to be redirected to. Leave blank to preserve the incoming host.
63+
Destination path | Define the path to use in the redirect. Leave blank to preserve the incoming path.
64+
Query string | Define the query string used in the redirect. Leave blank to preserve the incoming query string.
65+
Destination fragment | Define the fragment to use in the redirect. Leave blank to preserve the incoming fragment.
66+
67+
68+
### Route Type: Forward
69+
70+
Use this action to forward clients to a new URL. This action also contains sub actions for URL rewrites and Caching.
71+
72+
Field | Description
73+
------|------------
74+
Backend pool | Select the backend pool to override and serve the requests from. This will show all your preconfigured Backend pools currently in your Front Door profile.
75+
Forwarding protocol | Match Request, HTTP, HTTPS.
76+
URL rewrite | Use this action to rewrite the path of a request that's en route to your origin. If enabled, see below for additional fields required
77+
Caching | Enabled, Disabled. See below for additional fields required if enabled.
78+
79+
#### URL rewrite
80+
81+
Use this setting to configure an optional **Custom Forwarding Path** to use when constructing the request to forward to the backend.
82+
83+
Field | Description
84+
------|------------
85+
Custom forwarding path | Define the path to forward the requests to.
86+
87+
#### Caching
88+
89+
Use these settings to control how files are cached for requests that contain query strings and whether to cache your content based on all parameters or on selected parameters. You can use additional settings to overwrite the time to live (TTL) value to control how long contents stay in cache for requests that the rules match conditions specify. To force caching as an action, set the caching field to "Enabled." When you do this, this following options appear:
90+
91+
Cache behavior | Description
92+
---------------|----------------
93+
Ignore query strings | Once the asset is cached, all subsequent requests ignore the query strings until the cached asset expires.
94+
Cache every unique URL | Each request with a unique URL, including the query string, is treated as a unique asset with its own cache.
95+
Ignore specified query strings | Request URL query strings listed in "Query parameters" setting are ignored for caching.
96+
Include specified query strings | Request URL query strings listed in "Query parameters" setting are used for caching.
97+
98+
Additional fields | Description
99+
------------------|---------------
100+
Dynamic compression | Front Door can dynamically compress content on the edge, resulting in a smaller and faster response.
101+
Query parameters | A comma separated list of allowed (or disallowed) parameters to use as a basis for caching.
102+
Cache duration | Cache expiration duration in Days, Hours, Minutes, Seconds. All values must be Int.
103+
104+
## Next steps
105+
106+
- Learn how to set up your first [Rules Engine configuration](front-door-tutorial-rules-engine.md).
107+
- Learn more about [Rules Engine match conditions](front-door-rules-engine-match-conditions.md)
108+
- Learn more about [Azure Front Door Rules Engine](front-door-rules-engine.md)
Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
---
2+
title: Azure Front Door | Microsoft Docs
3+
description: This article provides an overview of Azure Front Door. Find out if it is the right choice for load-balancing user traffic for your application.
4+
services: frontdoor
5+
documentationcenter: ''
6+
author: megan-beatty
7+
editor: ''
8+
ms.service: frontdoor
9+
ms.devlang: na
10+
ms.topic: overview
11+
ms.tgt_pltfrm: na
12+
ms.workload: infrastructure-services
13+
ms.date: 4/30/2020
14+
ms.author: mebeatty
15+
# customer intent: As an IT admin, I want to learn about Front Door and what new features are available.
16+
---
17+
18+
# Azure Front Door Rules Engine Match Conditions
19+
20+
In [AFD Rules Engine](front-door-rules-engine.md) a rule consists of zero or more match conditions and an action. This article provides detailed descriptions of the match conditions you can use in AFD Rules Engine.
21+
22+
The first part of a rule is a match condition or set of match conditions. A rule can consist of up to 10 match conditions. A match condition identifies specific types of requests for which defined actions are performed. If you use multiple match conditions, the match conditions are grouped together by using AND logic. For all match conditions that support multiple values (noted below as "space-separated"), the "OR" operator is assumed.
23+
24+
For example, you can use a match condition to:
25+
26+
- Filter requests based on a specific IP address, country, or region.
27+
- Filter requests by header information.
28+
- Filter requests from mobile devices or desktop devices.
29+
30+
The following match conditions are available to use in Azure Front Door Rules engine.
31+
32+
## Device type
33+
34+
Identifies requests made from a mobile device or desktop device.
35+
36+
#### Required fields
37+
38+
Operator | Supported values
39+
---------|----------------
40+
Equals, Not equals | Mobile, Desktop
41+
42+
## Post argument
43+
44+
Identifies requests based on arguments defined for the POST request method that's used in the request.
45+
46+
#### Required fields
47+
48+
Argument name | Operator | Argument value | Case transform
49+
--------------|----------|----------------|---------------
50+
String | [Standard operator list](#standard-operator-list) | String, Int | Lowercase, Uppercase, Trim, Remove Whitespace, URL Encode, URL decode
51+
52+
## Query string
53+
54+
Identifies requests that contain a specific query string parameter. This parameter is set to a value that matches a specific 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.
55+
56+
#### Required fields
57+
58+
Operator | Query string | Case Transform
59+
---------|--------------|---------------
60+
[Standard operator list](#standard-operator-list) | String, Int | Lowercase, Uppercase, Trim, Remove Whitespace, URL Encode, URL decode
61+
62+
## Remote address
63+
64+
Identifies requests based on the requester's location or IP address.
65+
66+
#### Required fields
67+
68+
Operator | Supported values
69+
---------|-----------------
70+
Geo Match | Country code
71+
IP Match | IP address (space-separated)
72+
Not Geo Match | Country code
73+
Not IP Match | IP address (space-separated)
74+
75+
#### Key information
76+
77+
- Use CIDR notation.
78+
- To specify multiple IP addresses and IP address blocks, use a single space between the values:
79+
- **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.
80+
- **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.
81+
- The syntax for an IP address block is the base IP address followed by a forward slash and the prefix size. For example:
82+
- **IPv4 example**: *5.5.5.64/26* matches any requests that arrive from addresses 5.5.5.64 through 5.5.5.127.
83+
- **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.
84+
85+
## Request body
86+
87+
Identifies requests based on specific text that appears in the body of the request.
88+
89+
#### Required fields
90+
91+
Operator | Request body | Case transform
92+
---------|--------------|---------------
93+
[Standard operator list](#standard-operator-list) | String, Int | Lowercase, Uppercase, Trim, Remove Whitespace, URL Encode, URL decode
94+
95+
## Request header
96+
97+
Identifies requests that use a specific header in the request.
98+
99+
#### Required fields
100+
101+
Header name | Operator | Header value | Case transform
102+
------------|----------|--------------|---------------
103+
String | [Standard operator list](#standard-operator-list) | String, Int | Lowercase, Uppercase, Trim, Remove Whitespace, URL Encode, URL decode
104+
105+
## Request method
106+
107+
Identifies requests that use the specified request method.
108+
109+
#### Required fields
110+
111+
Operator | Supported values
112+
---------|----------------
113+
Equals, Not equals | GET, POST, PUT, DELETE, HEAD, OPTIONS, TRACE
114+
115+
#### Key information
116+
117+
- Only the GET request method can generate cached content in Azure Front Door. All other request methods are proxied through the network.
118+
119+
## Request protocol
120+
121+
Identifies requests that use the specified protocol used.
122+
123+
#### Required fields
124+
125+
Operator | Supported values
126+
---------|----------------
127+
Equals, Not equals | HTTP, HTTPS
128+
129+
## Request URL
130+
131+
Identifies requests that match the specified URL.
132+
133+
#### Required fields
134+
135+
Operator | Request URL | Case transform
136+
---------|-------------|---------------
137+
[Standard operator list](#standard-operator-list) | String, Int | Lowercase, Uppercase, Trim, Remove Whitespace, URL Encode, URL decode
138+
139+
#### Key information
140+
141+
- When you use this rule condition, be sure to include protocol information. For example: *https://www.\<yourdomain\>.com*.
142+
143+
## Request file extension
144+
145+
Identifies requests that include the specified file extension in the file name in the requesting URL.
146+
147+
#### Required fields
148+
149+
Operator | Extension | Case transform
150+
---------|-----------|---------------
151+
[Standard operator list](#standard-operator-list) | String, Int | Lowercase, Uppercase, Trim, Remove Whitespace, URL Encode, URL decode
152+
153+
#### Key information
154+
155+
- For extension, don't include a leading period; for example, use *html* instead of *.html*.
156+
157+
## Request file name
158+
159+
Identifies requests that include the specified file name in the requesting URL.
160+
161+
#### Required fields
162+
163+
Operator | File name | Case transform
164+
---------|-----------|---------------
165+
[Standard operator list](#standard-operator-list) | String, Int | Lowercase, Uppercase, Trim, Remove Whitespace, URL Encode, URL decode
166+
167+
#### Key information
168+
169+
- To specify multiple file names, separate each file name by pressing ENTER.
170+
171+
## Request path
172+
173+
Identifies requests that include the specified path in the requesting URL.
174+
175+
#### Required fields
176+
177+
Operator | Value | Case Transform
178+
---------|-------|---------------
179+
[Standard operator list](#standard-operator-list) | String, Int | Lowercase, Uppercase, Trim, Remove Whitespace, URL Encode, URL decode
180+
181+
## Standard operator list
182+
183+
For rules that accept values from the standard operator list, the following operators are valid:
184+
185+
- Any
186+
- Equals
187+
- Contains
188+
- Begins with
189+
- Ends with
190+
- Less than
191+
- Less than or equals
192+
- Greater than
193+
- Greater than or equals
194+
- Not any
195+
- Not contains
196+
- Not begins with
197+
- Not ends with
198+
- Not less than
199+
- Not less than or equals
200+
- Not greater than
201+
- Not greater than or equals
202+
203+
For numeric operators like *Less than* and *Greater than or equals*, the comparison used is based on length. In this case, the value in the match condition should be an integer that's equal to the length you want to compare.
204+
205+
206+
## Next steps
207+
208+
- Learn how to set up your first [Rules Engine configuration](front-door-tutorial-rules-engine.md).
209+
- Learn more about [Rules Engine actions](front-door-rules-engine-actions.md)
210+
- Learn more about [Azure Front Door Rules Engine](front-door-rules-engine.md)

0 commit comments

Comments
 (0)