Skip to content

Commit 27d549c

Browse files
committed
tweaks to scenario 2&3
1 parent 6c8ec20 commit 27d549c

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed
40.6 KB
Loading
46.1 KB
Loading

articles/frontdoor/rules-engine-scenarios.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,12 @@ Managing redirects is critical for search engine optimization (SEO), user experi
196196

197197
### Scenario 2: Populate or modify a response header based on a request header value
198198

199-
For example, add CORS header where needed to serve scripts on multiple origins from the same CDN domain, and response must contain the same FQDN in Access-Control-Allow-Origin header as the request Origin header, rather than allowing all domains (*) to enhance security. This can be achieved using {http_req_header_Origin}.
199+
In some scenarios, you may need to populate or modify a response header based on a request header value.
200+
201+
For example, you can add CORS header where needed to serve scripts on multiple origins from the same CDN domain, and response must contain the same FQDN in `Access-Control-Allow-Origin` header as the request origin header, rather than a wildcard allowing all domains (*) to enhance security. You can achieve it by using the `{http_req_header_Origin}` server variable to set the response header.
202+
203+
:::image type="content" source="./media/rules-engine-scenarios/modify-response-header.png" alt-text="Screenshot that shows how to modify a response header based on a request header value." lightbox="./media/rules-engine-scenarios/modify-response-header.png":::
204+
200205

201206
```json
202207
{
@@ -240,9 +245,13 @@ For example, add CORS header where needed to serve scripts on multiple origins f
240245
}
241246
```
242247

243-
### Scenario 3: Rename a response header generated by a cloud provider to a brand-specific one
248+
### Scenario 3: Rename a response header to a brand-specific one
249+
250+
You can rename a response header generated by a cloud provider by adding a new custom response header and deleting the original.
251+
252+
For example, you can replace the response header `X-Azure-Backend-ID` with a brand-specific header `X-Contoso-Scale-ID`.
244253

245-
This can be achieved by adding a new response header and deleting the original. E.g. Scenario: replace the response header X-Azure-Backend-ID with brand specific header ‘X-Contoso-Scale-ID' instead.
254+
:::image type="content" source="./media/rules-engine-scenarios/rename-response-header-brand-specific.png" alt-text="Screenshot that shows how to rename a response header to a brand-specific one." lightbox="./media/rules-engine-scenarios/rename-response-header-brand-specific.png":::
246255

247256
```json
248257
{

0 commit comments

Comments
 (0)