Configuration for an outbound HTTP proxy used by the HTTP client.
Defines the proxy endpoint, optional authentication, and TLS settings. When configured, all outgoing requests are routed through the proxy.
This element is typically used as a child of httpClientConfig.
Example Configuration
configuration:
httpClientConfig:
proxy:
host: localhost
port: 3128
authentication: true
username: alice
password: secret
configuration:
httpClientConfig:
proxy:
host: localhost
port: 3128
authentication: true
username: alice
password: secret
Syntax
proxy:
'$ref': <string>
authentication: <boolean>
host: <string>
password: <string>
port: <int>
ssl: {}
username: <string>
proxy:
'$ref': <string>
authentication: <boolean>
host: <string>
password: <string>
port: <int>
ssl: {}
username: <string>
Attributes
| Name | Required | Default | Description | Examples |
|---|---|---|---|---|
| $ref | false | - | Reference a component defined under components. | - |
| authentication | false | false | Whether to send a Basic Authentication header with proxy requests. If set to true, <username> and <password> must be provided. | - |
| host | false | - | The hostname or IP address of the proxy server. Required for proxy usage. | proxy.example.com |
| password | false | (not set) | Password for authenticating with the proxy server. Only used when authentication="true". | secret |
| port | false | 0 | TCP port on which the proxy server is listening. | 3128 |
| username | false | (not set) | Username for authenticating with the proxy server. Only used when authentication="true". | user |
Child Structure
| Element | Cardinality | Description |
|---|---|---|
| ssl | 0..1 | Configures a TLS context: the identity (key and certificate) presented to the peer, the certificates trusted from it, and handshake parameters such as protocol, ciphers, and client-certificate policy. Attach it to a serviceProxy/api to terminate inbound TLS, or to a target to make an outbound connection over TLS; most attributes and child elements apply to both directions, but a few - such as clientAuth and useAsDefault - only take effect on an inbound context. See tutorials/ssl-tls/10-TLS-Termination.yaml for inbound termination and tutorials/ssl-tls/20-Central-SSL-Config.yaml for sharing one ssl across several APIs via $ref. |