| title | Azure API Management policy reference - proxy | Microsoft Docs |
|---|---|
| description | Reference for the proxy policy available for use in Azure API Management. Provides policy usage, settings, and examples. |
| services | api-management |
| author | dlepow |
| ms.service | azure-api-management |
| ms.topic | reference |
| ms.date | 07/23/2024 |
| ms.author | danlep |
[!INCLUDE api-management-availability-all-tiers]
The proxy policy allows you to route requests forwarded to backends via an HTTP proxy. Only HTTP (not HTTPS) is supported between the gateway and the proxy. Basic and NTLM authentication only.
[!INCLUDE api-management-credentials-caution]
[!INCLUDE api-management-policy-generic-alert]
<proxy url="http://hostname-or-ip:port" username="username" password="password" />| Attribute | Description | Required | Default |
|---|---|---|---|
| url | Proxy URL in the form of http://host:port. Policy expressions are allowed. |
Yes | N/A |
| username | Username to be used for authentication with the proxy. Policy expressions are allowed. | No | N/A |
| password | Password to be used for authentication with the proxy. Policy expressions are allowed. | No | N/A |
- Policy sections: inbound
- Policy scopes: global, workspace, product, API, operation
- Gateways: classic, v2, consumption, self-hosted, workspace
- We recommend using named values to provide credentials, with secrets protected in a key vault.
In this example, named values are used for the username and password to avoid storing sensitive information in the policy document.
<proxy url="http://192.168.1.1:8080" username={{username}} password={{password}} />[!INCLUDE api-management-policy-ref-next-steps]