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
Copy file name to clipboardExpand all lines: articles/cdn/cdn-http-variables.md
+23-27Lines changed: 23 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,13 @@
2
2
title: HTTP variables for Azure CDN rules engine | Microsoft Docs
3
3
description: Learn about HTTP variables, which allow you to get HTTP request and response metadata for some rules engine features. Use metadata to alter a request/response.
4
4
services: cdn
5
-
documentationcenter: ''
6
5
author: duongau
7
-
manager: danielgi
8
-
editor: ''
9
-
10
-
ms.assetid:
6
+
manager: kumudd
11
7
ms.service: azure-cdn
12
8
ms.workload: tbd
13
9
ms.tgt_pltfrm: na
14
10
ms.topic: article
15
-
ms.date: 05/09/2018
11
+
ms.date: 02/27/2023
16
12
ms.author: duau
17
13
18
14
@@ -32,11 +28,11 @@ The following table describes the supported HTTP variables. A blank value is ret
32
28
33
29
| Name | Variable | Description | Sample value |
34
30
| ---- | -------- | ----------- | ------------ |
35
-
| ASN (Requester) | %{geo_asnum} | Indicates the requester's AS number. <br /><br />**Deprecated:** %{virt_dst_asnum}. <br />This variable has been deprecated in favor of %{geo_asnum}. Although a rule that uses this deprecated variable will continue to work, you should update it to use the new variable. | AS15133 |
31
+
| ASN (Requester) | %{geo_asnum} | Indicates the requester's AS number. <br /><br />**Deprecated:** %{virt_dst_asnum}. <br />This variable has been deprecated in favor of %{geo_asnum}. Although a rule that uses this deprecated variable continues to work, you should update it to use the new variable. | AS15133 |
36
32
| City (Requester) | %{geo_city} | Indicates the requester's city. | Los Angeles |
37
-
| Continent (Requester) | %{geo_continent} | Indicates the requester's continent through its abbreviation. <br />Valid values are: <br />AF: Africa<br />AS: Asia<br />EU: Europe<br />NA: North America<br />OC: Oceania<br />SA: South America<br /><br />**Deprecated:** %{virt_dst_continent}. <br />This variable has been deprecated in favor of %{geo_continent}. <br />Although a rule that uses this deprecated variable will continue to work, you should update it to use the new variable.| N/A |
33
+
| Continent (Requester) | %{geo_continent} | Indicates the requester's continent through its abbreviation. <br />Valid values are: <br />AF: Africa<br />AS: Asia<br />EU: Europe<br />NA: North America<br />OC: Oceania<br />SA: South America<br /><br />**Deprecated:** %{virt_dst_continent}. <br />This variable has been deprecated in favor of %{geo_continent}. <br />Although a rule that uses this deprecated variable continues to work, you should update it to use the new variable.| N/A |
38
34
| Cookie Value | %{cookie_Cookie} | Returns the value corresponding to the cookie key identified by the Cookie term. | Sample Usage: <br />%{cookie__utma}<br /><br />Sample Value:<br />111662281.2.10.1222100123 |
39
-
| Country/Region (Requester) | %{geo_country} | Indicates the requester's country/region of origin through its country/region code. <br />**Deprecated:** %{virt_dst_country}. <br /><br />This variable has been deprecated in favor of %{geo_country}. Although a rule that uses this deprecated variable will continue to work, you should update it to use the new variable. | US |
35
+
| Country/Region (Requester) | %{geo_country} | Indicates the requester's country/region of origin through its country/region code. <br />**Deprecated:** %{virt_dst_country}. <br /><br />This variable has been deprecated in favor of %{geo_country}. Although a rule that uses this deprecated variable continues to work, you should update it to use the new variable. | US |
40
36
| Designated Market Area (Requester) | %{geo_dma_code} |Indicates the requester's media market by its region code. <br /><br />This field is only applicable to requests that originate from the United States.| 745 |
41
37
| HTTP Request Method | %{request_method} | Indicates the HTTP request method. | GET |
42
38
| HTTP Status Code | %{status} | Indicates the HTTP status code for the response. | 200 |
@@ -57,7 +53,7 @@ The following table describes the supported HTTP variables. A blank value is ret
| Request URI (Relative) | %{request_uri} | Indicates the relative path, including the query string, defined in the request URI. | /marketing/foo.js?loggedin=true |
60
-
| Request URI (Relative without query string) | %{uri} | Indicates the relative path to the requested content. <br /><br/>Key information:<br />- This relative path excludes the query string.<br />- This relative path reflects URL rewrites. A URL will be rewritten under the following conditions:<br /> - URL Rewrite Feature: This feature rewrites the relative path defined in the request URI.<br /> - Edge CNAME URL: This type of request is rewritten to the corresponding CDN URL. |/800001/corigin/rewrittendir/foo.js |
56
+
| Request URI (Relative without query string) | %{uri} | Indicates the relative path to the requested content. <br /><br/>Key information:<br />- This relative path excludes the query string.<br />- This relative path reflects URL rewrites. A URL is rewritten under the following conditions:<br /> - URL Rewrite Feature: This feature rewrites the relative path defined in the request URI.<br /> - Edge CNAME URL: This type of request is rewritten to the corresponding CDN URL. |/800001/corigin/rewrittendir/foo.js |
61
57
| Request URI | %{request} | Describes the request. <br />Syntax: <HTTP method><relative path><HTTP protocol>| GET /marketing/foo.js?loggedin=true HTTP/1.1 |
62
58
| Response Header Value | %{resp_<ResponseHeader>} | Returns the value corresponding to the response header identified by the <ResponseHeader> term. <br /><br />If the name of the response header contains a dash (for example, User-Agent), replace it with an underscore (for example, User_Agent). | Sample Usage: %{resp_Content_Length}<br /><br />Sample Value: 100 |
63
59
@@ -90,11 +86,11 @@ The delimiters are described in the following table.
90
86
91
87
| Delimiter | Description |
92
88
| --------- | ----------- |
93
-
| := | Indicates that a default value will be assigned to the variable when it is either: <br />- Missing <br />- Set to NULL. |
94
-
| :+ | Indicates that a default value will be assigned to the variable when a value has been assigned to it. |
95
-
| : | Indicates that a substring of the value assigned to the variable will be expanded. |
96
-
| # | Indicates that the pattern specified after this delimiter should be deleted when it is found at the beginning of the value associated with the variable. |
97
-
| % | Indicates that the pattern specified after this delimiter should be deleted when it is found at the end of the value associated with the variable. <br />This definition is only applicable when the % symbol is used as a delimiter. |
89
+
| := | Indicates that a default value is assigned to the variable when it's either: <br />- Missing <br />- Set to NULL. |
90
+
| :+ | Indicates that a default value is assigned to the variable when a value has been assigned to it. |
91
+
| : | Indicates that a substring of the value assigned to the variable is expanded. |
92
+
| # | Indicates that the pattern specified after this delimiter should be deleted when it's present at the beginning of the value associated with the variable. |
93
+
| % | Indicates that the pattern specified after this delimiter should be deleted when it's present at the end of the value associated with the variable. <br />This definition is only applicable when the % symbol is used as a delimiter. |
98
94
| / | Delimits an HTTP variable or a pattern. |
99
95
| // | Find and replace all instances of the specified pattern. |
100
96
| /= | Find, copy, and rewrite all occurrences of the specified pattern. |
@@ -108,11 +104,11 @@ The following table describes circumstances under which the specified text isn't
108
104
109
105
| Condition | Description | Example |
110
106
| --------- | ----------- | --------|
111
-
| Escaping % symbol | The percentage symbol can be escaped through the use of a backslash. <br />The sample value to the right will be treated as a literal value and not as an HTTP variable.|\%{host} |
107
+
| Escaping % symbol | The percentage symbol can be escaped by using a backslash. <br />The sample value to the right is treated as a literal value and not as an HTTP variable.|\%{host} |
112
108
| Unknown variables | An empty string is always returned for unknown variables. | %{unknown_variable} |
113
109
| Invalid characters or syntax | Variables that contain invalid characters or syntax are treated as literal values. <br /><br />Example #1: The specified value contains an invalid character (for example, -). <br /><br />Example #2: The specified value contains a double set of curly braces. <br /><br />Example #3: The specified value is missing a closing curly brace.<br /> | Example #1: %{resp_user-agent} <br /><br />Example #2: %{{host}} <br /><br />Example #3: %{host |
114
-
| Missing variable name | A NULL value is always returned when a variable is not specified. | %{} |
115
-
| Trailing characters | Characters that trail a variable are treated as literal values. <br />The sample value to the right contains a trailing curly brace that will be treated as a literal value. | %{host}} |
110
+
| Missing variable name | A NULL value is always returned when a variable isn't specified. | %{} |
111
+
| Trailing characters | Characters that trail a variable are treated as literal values. <br />The sample value to the right contains a trailing curly brace that gets treated as a literal value. | %{host}} |
116
112
117
113
## Setting default header values
118
114
A default value can be assigned to a header when it meets any of the following conditions:
@@ -123,9 +119,9 @@ The following table describes how to define a default value.
123
119
124
120
| Condition | Syntax | Example | Description |
125
121
| --------- | ------ | --------| ----------- |
126
-
| Set a header to a default value when it meets any of the following conditions: <br /><br />- Missing Header <br /><br />- Header value is set to NULL.| %{Variable:=Value} | %{http_referrer:=unspecified} | The Referrer header will only be set to *unspecified* when it is either missing or set to NULL. No action will take place if it has been set. |
127
-
| Set a header to a default value when it is missing. | %{Variable=Value} | %{http_referrer=unspecified} | The Referrer header will only be set to *unspecified* when it is missing. No action will take place if it has been set. |
128
-
| Set the header to a default value when it does not meet any of the following conditions: <br /><br />- Missing<br /><br /> - Set to NULL. | %{Variable:+Value} | %{http_referrer:+unspecified} | The Referrer header will only be set to *unspecified* when a value has been assigned to it. No action will take place if it is either missing or set to NULL. |
122
+
| Set a header to a default value when it meets any of the following conditions: <br /><br />- Missing Header <br /><br />- Header value is set to NULL.| %{Variable:=Value} | %{http_referrer:=unspecified} | The Referrer header is set to *unspecified*only when it's either missing or set to NULL. No action takes place if it has been set. |
123
+
| Set a header to a default value when it's missing. | %{Variable=Value} | %{http_referrer=unspecified} | The Referrer header is set to *unspecified*only when it's missing. No action takes place if it has been set. |
124
+
| Set the header to a default value when it doesn't meet any of the following conditions: <br /><br />- Missing<br /><br /> - Set to NULL. | %{Variable:+Value} | %{http_referrer:+unspecified} | The Referrer header is set to *unspecified*only when a value has been assigned to it. No action takes place if it's either missing or set to NULL. |
129
125
130
126
## Manipulating variables
131
127
Variables can be manipulated in the following ways:
@@ -134,7 +130,7 @@ Variables can be manipulated in the following ways:
134
130
- Removing patterns
135
131
136
132
### Substring expansion
137
-
By default, a variable will expand to its full value. Use the following syntax to only expand a substring of the variable's value.
133
+
By default, a variable expands to its full value. Use the following syntax to only expand a substring of the variable's value.
138
134
139
135
`%<Variable>:<Offset>:<Length>}`
140
136
@@ -146,7 +142,7 @@ Key information:
146
142
- Zero: The starting character of the substring is the first character in the string.
147
143
- Negative: The starting character of the substring is calculated from the last character in the string.
148
144
149
-
- The length of the substring is determined by the *Length* term:
145
+
- The length of the substring gets determined by the *Length* term:
150
146
151
147
- Omitted: Omitting the Length term allows the substring to include all characters between the starting character and the end of the string.
152
148
- Positive: Determines the length of the substring from the starting character to the right.
@@ -162,7 +158,7 @@ The following string demonstrates various methods for manipulating variables:
- Expand text that matches the specified pattern by specifying a dollar sign followed by a whole integer (for example, $1).
216
212
217
-
- Multiple patterns can be specified. The order in which the pattern is specified determines the integer that will be assigned to it. In the following example, the first pattern matches "www.," the second pattern matches the second-level domain, and the third pattern matches the top-level domain:
213
+
- Multiple patterns can be specified. The order in which the pattern is specified determines the integer that is assigned to it. In the following example, the first pattern matches "www.," the second pattern matches the second-level domain, and the third pattern matches the top-level domain:
218
214
219
215
`%{host/=^www\.([^\.]+)\.([^\.:]+)/cdn.$2.$3:80}`
220
216
@@ -238,8 +234,8 @@ Key information:
238
234
- An operator must be specified before the pattern. The specified operator determines the pattern-capturing behavior:
239
235
240
236
-`=`: Indicates that all occurrences of the specified pattern must be captured and rewritten.
241
-
-`^`: Indicates that only text that starts with the specified pattern will be captured.
242
-
-`$`: Indicates that only text that ends with the specified pattern will be capture.
237
+
-`^`: Indicates that only text that starts with the specified pattern is captured.
238
+
-`$`: Indicates that only text that ends with the specified pattern is captured.
243
239
244
240
- If you omit the */Rewrite* value, the text that matches the pattern is deleted.
Copy file name to clipboardExpand all lines: articles/cdn/cdn-http2.md
+5-8Lines changed: 5 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,14 @@
2
2
title: HTTP/2 support in Azure CDN | Microsoft Docs
3
3
description: Azure Content Delivery Network supports HTTP/2, which has benefits over HTTP/1, such as multiplexing & concurrency, header compression, and stream dependencies.
4
4
services: cdn
5
-
documentationcenter: ''
6
-
author: lichard
7
-
manager: erikre
8
-
editor: ''
9
-
5
+
author: duongau
6
+
manager: kumudd
10
7
ms.service: azure-cdn
11
8
ms.workload: tbd
12
9
ms.tgt_pltfrm: na
13
10
ms.topic: article
14
-
ms.date: 5/04/2017
15
-
ms.author: ril
11
+
ms.date: 02/27/2023
12
+
ms.author: duau
16
13
17
14
---
18
15
@@ -39,7 +36,7 @@ The benefits of HTTP/2 include:
39
36
40
37
## HTTP/2 Browser Support
41
38
42
-
All of the major browsers have implemented HTTP/2 support in their current versions. Non-supported browsers automatically fallback to HTTP/1.1.
39
+
All of the major browsers have implemented HTTP/2 support in their current versions. Non-supported browsers automatically fall back to HTTP/1.1.
Copy file name to clipboardExpand all lines: articles/cdn/cdn-log-analysis.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ ms.service: azure-cdn
8
8
ms.workload: tbd
9
9
ms.tgt_pltfrm: na
10
10
ms.topic: article
11
-
ms.date: 11/30/2020
11
+
ms.date: 02/27/2023
12
12
ms.author: duau
13
13
---
14
14
@@ -41,7 +41,7 @@ Core analytics is available for CDN endpoints for all pricing tiers. Azure diagn
41
41
42
42
**Azure CDN Standard from Verizon** or **Azure CDN Premium from Verizon** profiles provide custom reports. You can view custom reports in the Verizon supplemental portal. Verizon custom reports are accessible via the **Manage** option from the Azure portal.
43
43
44
-
The custom reports display the number of hits or data transferred for each edge CNAME. Data is grouped by HTTP response code or cache status over period of time. For more information, see [Custom Reports from Verizon](cdn-verizon-custom-reports.md).
44
+
The custom reports display the number of hits or data transferred for each edge CNAME. Data gets grouped by HTTP response code or cache status over period of time. For more information, see [Custom Reports from Verizon](cdn-verizon-custom-reports.md).
@@ -45,16 +43,16 @@ Azure CDN Resource health is a subset of [Azure resource health](../service-heal
45
43
46
44
## Azure CDN-specific messages
47
45
48
-
Statuses related to Azure CDN resource health can be found below.
46
+
Statuses related to Azure CDN resource health can be found in the following table:
49
47
50
48
|Message | Recommended Action |
51
49
|---|---|
52
50
|You may have stopped, removed, or misconfigured one or more of your CDN endpoints | You may have stopped, removed, or misconfigured one or more of your CDN endpoints.|
53
-
|We are sorry, the CDN management service is currently unavailable | Check back here for status updates; If your problem persists after the expected resolution time, contact support.|
51
+
|We're sorry, the CDN management service is currently unavailable | Check back here for status updates; If your problem persists after the expected resolution time, contact support.|
54
52
|We're sorry, your CDN endpoints may be impacted by ongoing issues with some of our CDN providers | Check back here for status updates; Use the Troubleshoot tool to learn how to test your origin and CDN endpoint; If your problem persists after the expected resolution time, contact support. |
55
-
|We're sorry, CDN endpoint configuration changes are experiencing propagation delays | Check back here for status updates; If your configuration changes are not fully propagated in the expected time, contact support.|
56
-
|We're sorry, we are experiencing issues loading the supplemental portal | Check back here for status updates; If your problem persists after the expected resolution time, contact support.|
57
-
We are sorry, we are experiencing issues with some of our CDN providers | Check back here for status updates; If your problem persists after the expected resolution time, contact support. |
53
+
|We're sorry, CDN endpoint configuration changes are experiencing propagation delays | Check back here for status updates; If your configuration changes aren't fully propagated in the expected time, contact support.|
54
+
|We're sorry, we're experiencing issues loading the supplemental portal | Check back here for status updates; If your problem persists after the expected resolution time, contact support.|
55
+
We're sorry, we're experiencing issues with some of our CDN providers | Check back here for status updates; If your problem persists after the expected resolution time, contact support. |
0 commit comments