Skip to content

Commit fb7bc46

Browse files
Merge pull request #298066 from halkazwini/afd-headers
Freshness: Tutorial: Add Security Headers with Rules Engine
2 parents 648d17b + 0c1ffe8 commit fb7bc46

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed
Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,42 @@
11
---
2-
title: 'Tutorial: Add security headers with Rules Engine - Azure Front Door'
3-
description: This tutorial teaches you how to configure a security header via Rules Engine on Azure Front Door
2+
title: 'Tutorial: Add security headers with Rules Engine'
3+
titleSuffix: Azure Front Door
4+
description: In this tutorial, you learn how to configure a security header via Rules Engine on Azure Front Door using the Azure portal.
45
author: halkazwini
56
ms.author: halkazwini
67
ms.service: azure-frontdoor
78
ms.topic: tutorial
8-
ms.date: 11/15/2024
9+
ms.date: 04/10/2025
910

1011
# Customer intent: As an IT admin, I want to learn about Front Door and how to configure a security header via Rules Engine.
1112
---
1213

13-
# Tutorial: Add Security Headers with Rules Engine
14+
# Tutorial: Add security headers with rules engine
1415

1516
[!INCLUDE [Azure Front Door (classic) retirement notice](../../includes/front-door-classic-retirement.md)]
1617

1718
This tutorial demonstrates how to implement security headers to prevent browser-based vulnerabilities such as HTTP Strict-Transport-Security (HSTS), X-XSS-Protection, Content-Security-Policy, and X-Frame-Options. Security attributes can also be defined with cookies.
1819

19-
The example below shows how to add a Content-Security-Policy header to all incoming requests that match the path defined in the route associated with your Rules Engine configuration. In this scenario, only scripts from the trusted site **https://apiphany.portal.azure-api.net** are allowed to run on the application.
20+
The example in this tutorial shows how to add a Content-Security-Policy header to all incoming requests that match the path defined in the route associated with your rules engine configuration. In this scenario, only scripts from the trusted site `https://apiphany.portal.azure-api.net` are allowed to run on the application.
2021

21-
In this tutorial, you will learn how to:
22+
In this tutorial, you learn how to:
2223
> [!div class="checklist"]
23-
> - Configure a Content-Security-Policy within Rules Engine.
24+
> - Configure a Content-Security-Policy within rules engine.
2425
2526
## Prerequisites
2627

2728
* An Azure subscription.
28-
* An Azure Front Door. To complete this tutorial, you must have an Azure Front Door configured with Rules Engine. For more information, see [Quickstart: Create an Azure Front Door](quickstart-create-front-door.md) and [Configure your Rules Engine](front-door-tutorial-rules-engine.md).
29+
* An Azure Front Door. To complete this tutorial, you must have an Azure Front Door configured with rules engine. For more information, see [Create an Azure Front Door](quickstart-create-front-door.md) and [Configure your rules engine](front-door-tutorial-rules-engine.md).
2930

3031
## Add a Content-Security-Policy header in Azure portal
3132

32-
1. In your Azure Front Door resource, go to **Settings** and select **Rules engine configuration**. Choose the rules engine where you want to add the security header.
33+
1. In your Azure Front Door resource, select **Rules engine configuration** under **Settings**. Choose the rules engine where you want to add the security header.
3334

34-
2. Click **Add rule** to create a new rule. Name the rule and then select **Add an Action** > **Response Header**.
35+
2. Select **Add rule** to create a new rule. Name the rule and then select **Add an Action** > **Response Header**.
3536

3637
3. Set the Operator to **Append** to add this header to all incoming requests for this route.
3738

38-
4. Enter the header name: *Content-Security-Policy* and specify the values for this header. In this example, use *`script-src 'self' https://apiphany.portal.azure-api.net`*. Click **Save**.
39+
4. Enter the header name: *Content-Security-Policy* and specify the values for this header. In this example, use *`script-src 'self' https://apiphany.portal.azure-api.net`*. Select **Save**.
3940

4041
:::image type="content" source="./media/front-door-security-headers/front-door-security-header.png" alt-text="Screenshot showing the added security header.":::
4142

@@ -51,11 +52,9 @@ In this tutorial, you will learn how to:
5152
5253
## Clean up resources
5354

54-
If you no longer need the security header rule configured in the previous steps, you can remove it. To do this, go to the rules engine in your Azure Front Door resource and select **Delete rule**.
55+
If you no longer need the security header rule configured in the previous steps, you can remove it by selecting **Delete rule** in the rules engine.
5556

56-
## Next steps
57-
58-
To learn how to configure a Web Application Firewall for your Azure Front Door, proceed to the next tutorial.
57+
## Next step
5958

6059
> [!div class="nextstepaction"]
6160
> [Web Application Firewall and Azure Front Door](front-door-waf.md)

0 commit comments

Comments
 (0)