How to apply CSP headers using Azure Frontdoor
This example demonstrates how to enforce Content-Security-Policy (CSP) headers on an Azure Front Door endpoint by defining a rule set in Bicep. It shows the creation of a rule that first deletes any existing CSP header from the backend, then appends separate directives for script, style, and font sources. The configuration uses the `Microsoft.Cdn/profiles/ruleSets/rules` API to add actions of type `ModifyResponseHeader`, and associates the rule set with a route via `Microsoft.Cdn/profiles/afdendpoints/routes`. The code relies on Azure Front Door’s resource definitions without external data sources.