# Set up with Azure Front Door

For sites using Azure Front Door as a CDN/reverse proxy, set up Same-Origin by creating a new origin and route in the Azure dashboard.

## Step 1. Create an origin

- In the Azure portal, open the Front Door console and select your configuration.
- Go to Settings > Origin groups and click Add to create a new origin group.
- Enter a descriptive name and click Add an origin.
- Under Origin type, select Custom.
- In the Host name field, enter your Wascer container domain (for example, sst.yoursite.com.br).
- Disable Enable health probes.
- Click Add and wait for processing.

## Step 2. Create a route

- Go to Settings > Front Door manager and expand the endpoint you want.
- Click Add a route.
- Define a name for the route and select the correct domain under Domains.
- In Patterns to match, enter the path you want (e.g., /metrics/*).
- Select the origin group created in the previous step.
- Set Origin path to /.
- Click Add.

## Step 3. Configure headers

- Go to Settings > Rule sets and click Add.
- Add a condition: Request path Begins with /metrics.
- Add actions to modify the request header:
- Header X-From-Cdn with value az-wascer.
- Save and associate the rule set with the route created earlier.

Source: https://wascer.com/helpdesk/abordagem-same-origin/configuracao-via-azure-front-door
