Open Source API Gateway

proxy

Version

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

NameRequiredDefaultDescriptionExamples
$reffalse-Reference a component defined under components.-
authenticationfalsefalseWhether to send a Basic Authentication header with proxy requests. If set to true, <username> and <password> must be provided.-
hostfalse-The hostname or IP address of the proxy server. Required for proxy usage.proxy.example.com
passwordfalse(not set)Password for authenticating with the proxy server. Only used when authentication="true".secret
portfalse0TCP port on which the proxy server is listening.3128
usernamefalse(not set)Username for authenticating with the proxy server. Only used when authentication="true".user

Child Structure

ElementCardinalityDescription
ssl0..1Configures 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.

Can be used in