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/static-web-apps/front-door-manual.md
+53-60Lines changed: 53 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,58 +5,49 @@ services: static-web-apps
5
5
author: craigshoemaker
6
6
ms.service: static-web-apps
7
7
ms.topic: how-to
8
-
ms.date: 07/05/2022
8
+
ms.date: 01/24/2023
9
9
ms.author: cshoe
10
10
---
11
11
12
12
# Tutorial: Manually configure Azure Front Door for Azure Static Web Apps
13
13
14
-
Learn to add [Azure Front Door](../frontdoor/front-door-overview.md) as the CDN for your static web app. Azure Front Door is a scalable and secure entry point for fast delivery of your web applications.
14
+
Add [Azure Front Door](../frontdoor/front-door-overview.md) as the CDN for your static web app. Azure Front Door is a scalable and secure entry point for fast delivery of your web applications.
15
15
16
-
> [!NOTE]
17
-
> Consider using [enterprise-grade edge](enterprise-edge.md) for faster page loads, enhanced security, and optimized reliability for global applications.
18
-
19
-
In this tutorial, you learn how to:
16
+
In this tutorial, learn how to do the following tasks:
20
17
21
18
> [!div class="checklist"]
22
19
>
23
20
> - Create an Azure Front Door Standard/Premium instance
24
21
> - Associate Azure Front Door with your Azure Static Web Apps site
25
22
26
23
> [!NOTE]
27
-
> This tutorial requires the Azure Static Web Apps Standard and Azure Front Door Standard / Premium plans.
28
-
29
-
## Copy web app URL
30
-
31
-
1. Go to the Azure portal.
32
-
33
-
1. Open the static web app that you want to apply Azure Front Door.
34
-
35
-
1. Go to the *Overview* section.
36
-
37
-
1. Copy the *URL* to your clipboard for later use.
38
-
39
-
## Add Azure Front Door
24
+
> - Consider using [enterprise-grade edge](enterprise-edge.md) for faster page loads, enhanced security, and optimized reliability for global applications.
25
+
> - This tutorial requires the Azure Static Web Apps Standard and Azure Front Door Standard / Premium plans.
40
26
41
-
When creating an Azure Front Door profile, you must select an origin from the same subscription as the selected the Front Door.
27
+
## Prerequisites
42
28
43
-
1. Go to the Azure home screen.
44
-
45
-
1. Select **Create a resource**.
29
+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F)
30
+
- A static web app. [Build your first static web app](get-started-portal.md).
31
+
<!--
32
+
## Copy web app URL
46
33
47
-
1.Search for **Front Door**.
34
+
1. Sign in to the [Azure portal](https://portal.azure.com).
48
35
49
-
1. Select **Front Door and CDN profiles**.
36
+
2. Open the static web app that you want to apply Azure Front Door.
50
37
51
-
1. Select **Create**.
38
+
3. Go to the *Overview* section.
52
39
53
-
1. Select the **Azure Front Door** option.
40
+
4. Copy the *URL* to your clipboard for later use.
54
41
55
-
1. Select the **Quick create** option.
42
+
:::image type="content" source="media/front-door-manual/copy-url-static-web-app.png" alt-text="Screenshot of Static Web App Overview page.":::
43
+
-->
56
44
57
-
1. Select **Continue to create a front door**.
45
+
## Create an Azure Front Door
58
46
59
-
1. In the *Basics* tab, enter the following values:
47
+
1. Sign in to the [Azure portal](https://portal.azure.com).
48
+
2. From the home page or the Azure menu, select **+ Create a resource**. Search for *Front Door and CDN profiles*, and then select **Create** > **Front Door and CDN profiles**.
49
+
3. On the Compare offerings page, select **Quick create**, and then select **Continue to create a Front Door**.
50
+
4. On the **Create a Front Door profile** page, enter or select the following settings.
60
51
61
52
| Setting | Value |
62
53
|---|---|
@@ -73,13 +64,12 @@ When creating an Azure Front Door profile, you must select an origin from the sa
73
64
| Compression | Select **Enable compression**|
74
65
| WAF policy | Select **Create new** or select an existing Web Application Firewall policy from the dropdown if you want to enable this feature. |
75
66
76
-
1. Select **Review + create**.
77
-
78
-
1. Select **Create**.
67
+
> [!NOTE]
68
+
> When you create an Azure Front Door profile, you must select an origin from the same subscription the Front Door is created in.
79
69
80
-
The creation process may take a few minutes to complete.
81
-
82
-
1. Select **Go to resource**.
70
+
5. Select **Review + create**, and then select **Create**. The creation process may take a few minutes to complete.
71
+
6. When deployment completes, select **Go to resource**.
72
+
7.[Add a condition](#add-a-condition).
83
73
84
74
## Disable cache for auth workflow
85
75
@@ -90,61 +80,64 @@ Add the following settings to disable Front Door's caching policies from trying
90
80
91
81
### Add a condition
92
82
93
-
1. Under *Settings*, select **Rule set**.
94
-
95
-
1. Select **Add**.
83
+
1. From your Front Door, under *Settings*, select **Rule set**.
96
84
97
-
1. In the *Rule set name* textbox, enter **Security**.
85
+
2. Select **+ Add**.
98
86
99
-
1. In the *Rule name* textbox, enter **NoCacheAuthRequests**.
87
+
3. In the *Rule set name* textbox, enter **Security**.
100
88
101
-
1. Select **Add a condition**.
89
+
4. In the *Rule name* textbox, enter **NoCacheAuthRequests**.
102
90
103
-
1. Select **Request path**.
91
+
5. Select **Add a condition**.
104
92
105
-
1. Select **Begins With** in the *Operator* drop-down.
93
+
6. Select **Request path**.
106
94
107
-
1. Select the **Edit** link above the *Value* textbox.
95
+
7. Select the *Operator* drop-down, and then **Begins With**.
108
96
109
-
1. Enter **/.auth** in the textbox.
110
-
111
-
1. Select **Update**.
112
-
113
-
1. Select the **No transform** option from the *Case transform* dropdown.
97
+
8. Select the **Edit** link above the *Value* textbox.
114
98
99
+
9. Enter `/.auth` in the textbox, and then select **Update**.
100
+
<!-->
101
+
10. Select the **No transform** option from the *Case transform* dropdown.
102
+
I don't see this option available when I run through this task.
103
+
-->
115
104
### Add an action
116
105
117
106
1. Select the **Add an action** dropdown.
118
107
119
-
1. Select **Route configuration override**.
108
+
2. Select **Route configuration override**.
120
109
121
-
1. Select **Disabled** in the *Caching* dropdown.
110
+
3. Select **Disabled** in the *Caching* dropdown.
122
111
123
-
2. Select **Save**.
112
+
4. Select **Save**.
124
113
125
114
### Associate rule to an endpoint
126
115
127
-
Now that the rule is created, you apply the rule to a Front Door endpoint.
116
+
Now that the rule is created, apply the rule to a Front Door endpoint.
128
117
129
-
1.Select the **Unassociated** link.
118
+
1.From your Front Door, select **Rule set**, and then the **Unassociated** link.
130
119
131
-
1. Select the endpoint name to which you want to apply the caching rule.
120
+
:::image type="content" source="media/front-door-manual/rule-set-select-unassociated.png" alt-text="Screenshot showing selections for Rule set and Unassociated links.":::
132
121
133
-
2. Select **Next**.
122
+
2. Select the endpoint name to which you want to apply the caching rule, and then select **Next**.
Use the following steps to copy the Front Door instance's unique identifier.
140
131
141
-
1. Select the **Overview** link on the left-hand navigation.
132
+
1. From your Front Door, select the **Overview** link on the left-hand navigation.
133
+
134
+
1. Copy the value labeled **Front Door ID** and paste it into a file for later use.
142
135
143
-
1. From the *Overview* window, copy the value labeled **Front Door ID**and paste it into a file for later use.
136
+
:::image type="content" source="media/front-door-manual/copy-front-door-id.png" alt-text="Screenshot showing highlighted Overview item and highlighted Front Door ID number.":::
144
137
145
138
## Update static web app configuration
146
139
147
-
To complete the integration with Front Door, you need to update the application configuration file to:
140
+
To complete the integration with Front Door, you need to update the application configuration file to do the following functions:
148
141
149
142
- Restrict traffic to your site only through Front Door
150
143
- Restrict traffic to your site only from your Front Door instance
0 commit comments