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 987bcca

Browse files
author
Maxwell Gattuso
committedNov 16, 2019
updating with more rules engine
1 parent 0ce5870 commit 987bcca

File tree

8 files changed

+32
-20
lines changed

8 files changed

+32
-20
lines changed
 

‎articles/cdn/cdn-caching-rules-tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ms.custom: mvc
2222
# Tutorial: Set Azure CDN caching rules
2323

2424
> [!NOTE]
25-
> Azure CDN caching rules are available only for **Azure CDN Standard from Verizon** and **Azure CDN Standard from Akamai**. For **Azure CDN Premium from Verizon**, use the [Azure CDN rules engine](cdn-rules-engine.md) in the **Manage** portal for similar functionality.
25+
> Caching rules are available only for **Azure CDN Standard from Verizon** and **Azure CDN Standard from Akamai** profiles. For **Azure CDN from Microsoft** profiles, you must use the [Standard rules engine](cdn-standard-rules-engine-reference.md) For **Azure CDN Premium from Verizon** profiles, you must use the [Verizon Premium rules engine](cdn-rules-engine.md) in the **Manage** portal for similar functionality.
2626
2727

2828
This tutorial describes how you can use Azure Content Delivery Network (CDN) caching rules to set or modify default cache expiration behavior both globally and with custom conditions, such as a URL path and file extension. Azure CDN provides two types of caching rules:

‎articles/cdn/cdn-caching-rules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ms.author: magattus
1919
# Control Azure CDN caching behavior with caching rules
2020

2121
> [!NOTE]
22-
> Caching rules are available only for **Azure CDN Standard from Verizon** and **Azure CDN Standard from Akamai** profiles. For **Azure CDN Premium from Verizon** profiles, you must use the [Azure CDN rules engine](cdn-rules-engine.md) in the **Manage** portal for similar functionality.
22+
> Caching rules are available only for **Azure CDN Standard from Verizon** and **Azure CDN Standard from Akamai** profiles. For **Azure CDN from Microsoft** profiles, you must use the [Standard rules engine](cdn-standard-rules-engine-reference.md) For **Azure CDN Premium from Verizon** profiles, you must use the [Verizon Premium rules engine](cdn-rules-engine.md) in the **Manage** portal for similar functionality.
2323
2424
Azure Content Delivery Network (CDN) offers two ways to control how your files are cached:
2525

‎articles/cdn/cdn-cors.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,21 @@ If requests have already been made to the CDN prior to CORS being set on your or
5959
## Multiple origin scenarios
6060
If you need to allow a specific list of origins to be allowed for CORS, things get a little more complicated. The problem occurs when the CDN caches the **Access-Control-Allow-Origin** header for the first CORS origin. When a different CORS origin makes a subsequent request, the CDN will serve the cached **Access-Control-Allow-Origin** header, which won't match. There are several ways to correct this.
6161

62-
### Azure CDN Premium from Verizon
63-
The best way to enable this is to use **Azure CDN Premium from Verizon**, which exposes some advanced functionality.
62+
### Azure CDN standard profiles
63+
On Azure CDN Standard from Microsoft, you can create a rule in the [Standard rules engine](cdn-standard-rules-engine-reference.md) to check the **Origin** header on the request. If it's a valid origin, your rule will set the **Access-Control-Allow-Origin** header with the desired value. In this case, the **Access-Control-Allow-Origin** header from the file's origin server is ignored and the CDN's rules engine completely manages the allowed CORS origins.
64+
65+
![Rules example with standard rules engine](./media/cdn-cors/cdn-standard-cors.png)
66+
67+
> [!TIP]
68+
> You can add additional actions to your rule to modify additional response headers, such as **Access-Control-Allow-Methods**.
69+
>
70+
71+
On **Azure CDN Standard from Akamai**, the only mechanism to allow for multiple origins without the use of the wildcard origin is to use [query string caching](cdn-query-string.md). Enable the query string setting for the CDN endpoint and then use a unique query string for requests from each allowed domain. Doing so will result in the CDN caching a separate object for each unique query string. This approach is not ideal, however, as it will result in multiple copies of the same file cached on the CDN.
6472

65-
You'll need to [create a rule](cdn-rules-engine.md) to check the **Origin** header on the request. If it's a valid origin, your rule will set the **Access-Control-Allow-Origin** header with the origin provided in the request. If the origin specified in the **Origin** header is not allowed, your rule should omit the **Access-Control-Allow-Origin** header, which will cause the browser to reject the request.
73+
### Azure CDN Premium from Verizon
74+
Using the Verizon Premium rules engine, You'll need to [create a rule](cdn-rules-engine.md) to check the **Origin** header on the request. If it's a valid origin, your rule will set the **Access-Control-Allow-Origin** header with the origin provided in the request. If the origin specified in the **Origin** header is not allowed, your rule should omit the **Access-Control-Allow-Origin** header, which will cause the browser to reject the request.
6675

67-
There are two ways to do this with the rules engine. In both cases, the **Access-Control-Allow-Origin** header from the file's origin server is ignored and the CDN's rules engine completely manages the allowed CORS origins.
76+
There are two ways to do this with the Premium rules engine. In both cases, the **Access-Control-Allow-Origin** header from the file's origin server is ignored and the CDN's rules engine completely manages the allowed CORS origins.
6877

6978
#### One regular expression with all valid origins
7079
In this case, you'll create a regular expression that includes all of the origins you want to allow:
@@ -90,6 +99,5 @@ Rather than regular expressions, you can instead create a separate rule for each
9099
>
91100
>
92101
93-
### Azure CDN standard profiles
94-
On Azure CDN standard profiles (**Azure CDN Standard from Microsoft**, **Azure CDN Standard from Akamai**, and **Azure CDN Standard from Verizon**), the only mechanism to allow for multiple origins without the use of the wildcard origin is to use [query string caching](cdn-query-string.md). Enable the query string setting for the CDN endpoint and then use a unique query string for requests from each allowed domain. Doing so will result in the CDN caching a separate object for each unique query string. This approach is not ideal, however, as it will result in multiple copies of the same file cached on the CDN.
102+
95103

‎articles/cdn/cdn-features.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.workload: tbd
1313
ms.tgt_pltfrm: na
1414
ms.devlang: na
1515
ms.topic: overview
16-
ms.date: 06/05/2019
16+
ms.date: 11/15/2019
1717
ms.author: magattus
1818
ms.custom: mvc
1919

@@ -39,11 +39,11 @@ The following table compares the features available with each product.
3939
| [Global server load balancing (GSLB)](https://docs.microsoft.com/azure/traffic-manager/traffic-manager-load-balancing-azure) | **✓** |**✓** |**✓** |**✓** |
4040
| [Fast purge](cdn-purge-endpoint.md) | **✓** |**✓**, Purge all and Wildcard purge are not supported by Azure CDN from Akamai currently |**✓** |**✓** |
4141
| [Asset pre-loading](cdn-preload-endpoint.md) | | |**✓** |**✓** |
42-
| Cache/header settings (using [caching rules](cdn-caching-rules.md)) | |**✓** |**✓** | |
43-
| Customizable, rules based content delivery engine (using [rules engine](cdn-rules-engine.md)) | | | |**✓** |
44-
| Cache/header settings (using [rules engine](cdn-rules-engine.md)) | | | |**✓** |
45-
| URL redirect/rewrite (using [rules engine](cdn-rules-engine.md)) | | | |**✓** |
46-
| Mobile device rules (using [rules engine](cdn-rules-engine.md)) | | | |**✓** |
42+
| Cache/header settings (using [caching rules](cdn-caching-rules.md)) |**✓** using [Standard rules engine](cdn-standard-rules-engine.md) |**✓** |**✓** | |
43+
| Customizable, rules based content delivery engine |**✓** using [Standard rules engine](cdn-standard-rules-engine.md) | | |**✓** using [rules engine](cdn-rules-engine.md) |
44+
| Cache/header settings |**✓** using [Standard rules engine](cdn-standard-rules-engine.md) | | |**✓** using [Premium rules engine](cdn-rules-engine.md) |
45+
| URL redirect/rewrite |**✓** using [Standard rules engine](cdn-standard-rules-engine.md) | | |**✓** using [Premium rules engine](cdn-rules-engine.md) |
46+
| Mobile device rules |**✓** using [Standard rules engine](cdn-standard-rules-engine.md) | | |**✓** using [Premium rules engine](cdn-rules-engine.md) |
4747
| [Query string caching](cdn-query-string.md) | **✓** |**✓** |**✓** |**✓** |
4848
| IPv4/IPv6 dual-stack | **✓** |**✓** |**✓** |**✓** |
4949
| [HTTP/2 support](cdn-http2.md) | **✓** |**✓** |**✓** |**✓** |

‎articles/cdn/cdn-storage-custom-domain-https.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,15 @@ Azure CDN ignores any restrictions added to the SAS token. For example, all SAS
4141
If you create multiple SAS URLs for the same blob endpoint, consider enabling query string caching. Doing so ensures that each URL is treated as a unique entity. For more information, see [Controlling Azure CDN caching behavior with query strings](cdn-query-string.md).
4242

4343
## HTTP-to-HTTPS redirection
44-
You can elect to redirect HTTP traffic to HTTPS by creating a [URL Redirect rule](cdn-verizon-premium-rules-engine-reference-features.md#url-redirect) with the [Azure CDN rules engine](cdn-verizon-premium-rules-engine.md). This option requires an **Azure CDN Premium from Verizon** profile.
44+
You can elect to redirect HTTP traffic to HTTPS by creating a URL redirect rule with the [Standard rules engine](cdn-standard-rules-engine.md) or the [Verizon Premium rules engine](cdn-verizon-premium-rules-engine.md). Standard Rules engine is available only for Azure CDN from Microsoft profiles, while Verizon premium rules engine is available only from Azure CDN Premium from Verizon profiles.
4545

46-
![URL redirect rule](./media/cdn-storage-custom-domain-https/cdn-url-redirect-rule.png)
46+
![Microsoft redirect rule](./media/cdn-storage-custom-domain-https/cdn-standard-redirect-rule.png)
4747

48-
In this rule, *Cdn-endpoint-name* refers to the name that you configured for your CDN endpoint, which you can select from the drop-down list. The value for *origin-path* refers to the path within your origin storage account where your static content resides. If you're hosting all static content in a single container, replace *origin-path* with the name of that container.
48+
In the above rule, leaving Hostname, Path, Query string, and Fragment will result in the incoming values being used in the redirect.
49+
50+
![Verizon redirect rule](./media/cdn-storage-custom-domain-https/cdn-url-redirect-rule.png)
51+
52+
In the above rule, *Cdn-endpoint-name* refers to the name that you configured for your CDN endpoint, which you can select from the drop-down list. The value for *origin-path* refers to the path within your origin storage account where your static content resides. If you're hosting all static content in a single container, replace *origin-path* with the name of that container.
4953

5054
## Pricing and billing
5155
When you access blobs through Azure CDN, you pay [Blob storage prices](https://azure.microsoft.com/pricing/details/storage/blobs/) for traffic between the POP servers and the origin (Blob storage), and [Azure CDN pricing](https://azure.microsoft.com/pricing/details/cdn/) for data accessed from the POP servers.
Loading
Loading

‎includes/cdn-premium-feature.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ services: cdn
55
author: SyntaxC4
66
ms.service: azure-cdn
77
ms.topic: include
8-
ms.date: 04/13/2018
9-
ms.author: cfowler
8+
ms.date: 11/15/2019
9+
ms.author: magattus
1010
ms.custom: include file
1111
---
1212

1313
> [!IMPORTANT]
14-
> This is a feature of **Azure CDN Premium from Verizon** only, and is not available with Azure CDN standard products. For a comparison of CDN features, see [Azure CDN product features](../articles/cdn/cdn-features.md).
14+
> This is a feature of **Azure CDN Premium from Verizon** only, to configure rules on **Azure CDN from Microsoft** please use the [Standard rules engine](cdn-standard-rules-engine-reference.md). Advanced rules are not available for **Azure CDN from Akamai**. For a full comparison of CDN features, see [Azure CDN product features](../articles/cdn/cdn-features.md).
1515
>
1616
>
1717

0 commit comments

Comments
 (0)
Please sign in to comment.