Skip to content

Commit 5836f34

Browse files
authored
Merge pull request #289603 from dlepow/red
[APIM] Update redirect-content-urls policy - UUF
2 parents 37a9d9d + 16dbc25 commit 5836f34

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed
15.5 KB
Loading
7.8 KB
Loading

articles/api-management/redirect-content-urls-policy.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ms.author: danlep
1414

1515
[!INCLUDE [api-management-availability-all-tiers](../../includes/api-management-availability-all-tiers.md)]
1616

17-
The `redirect-content-urls` policy rewrites (masks) links in the response body so that they point to the equivalent link via the gateway. Use in the outbound section to rewrite response body links to the backend service to make them point to the gateway. Use in the inbound section for an opposite effect.
17+
The `redirect-content-urls` policy rewrites (masks) links in the response body. Use in the outbound section to rewrite response body links to the backend service to make them point to the gateway instead. For example, you might do this to hide URLs of the original backend service when they appear in the response. Use in the inbound section for an opposite effect.
1818

1919
> [!NOTE]
2020
> This policy does not change any header values such as `Location` headers. To change header values, use the [set-header](set-header-policy.md) policy.
@@ -44,6 +44,14 @@ The `redirect-content-urls` policy rewrites (masks) links in the response body s
4444
<redirect-content-urls />
4545
```
4646

47+
For example, consider the following image, which shows an API response body that includes the original backend service URLs.
48+
49+
:::image type="content" source="media/redirect-content-urls-policy/original-response.png" alt-text="Screenshot showing original outbound response in test console in the portal.":::
50+
51+
After the `redirect-content-urls` policy is configured in the outbound section, the response body is rewritten to point to the gateway, in this case, `https://apim-hello-world.azure-api.net`.
52+
53+
:::image type="content" source="media/redirect-content-urls-policy/test-replaced-url.png" alt-text="Screenshot showing replaced URLs in test console in the portal.":::
54+
4755
## Related policies
4856

4957
* [Transformation](api-management-policies.md#transformation)

0 commit comments

Comments
 (0)