Skip to main content

Outbound HTTP Client and Proxy Configuration

You're reading API Gateway 2026.10.0. The newest release is 1.2.0. Go to the newest release

The gateway has two outbound HTTP clients, one for the Gateway Controller and one for the Policy Engine:

ClientUsed byWhat it calls
controller.http_clientGateway ControllerThe control plane, the Platform API, and on-premises APIM, for artifact and deployment sync
policy_engine.http_clientPolicy EngineOutbound calls a policy makes, such as to a guardrail or moderation service, an external validation service, or an LLM provider

Both clients take the same settings. Every setting on this page applies to either one: use controller.http_client or policy_engine.http_client as the table prefix.

Connection pooling​

[controller.http_client.pooling]
max_idle_conns = 100
max_idle_conns_per_host = 10
max_conns_per_host = 100
idle_conn_timeout = "90s"
keep_alive = "30s"
disable_keep_alives = false
enable_http2 = false
SettingDefaultDescription
max_idle_conns100Maximum idle (keep-alive) connections across all hosts.
max_idle_conns_per_host10Maximum idle connections kept open per destination host.
max_conns_per_host100Maximum total connections (idle plus active) per destination host.
idle_conn_timeout90sHow long an idle connection stays in the pool before it's closed.
keep_alive30sTCP keep-alive probe interval for open connections.
disable_keep_alivesfalseWhen true, closes each connection after one request instead of reusing it.
enable_http2falseUses HTTP/2 for this client.
HTTP/2 is off by default

With HTTP/2, a single connection can serve requests for more than one hostname that resolves to the same address. Review this before enabling it if you rely on per-hostname network segmentation.

Every key in this table is optional, and omitting the whole [*.http_client.pooling] section keeps these defaults.

Timeouts​

[controller.http_client.timeouts]
overall = "60s"
dial = "10s"
tls_handshake = "10s"
response_header = "10s"
expect_continue = "1s"
max_response_bytes = 0
SettingController defaultPolicy Engine defaultDescription
overall60s30sUpper bound for an entire outbound call.
dial10s10sTCP connection establishment timeout.
tls_handshake10s10sTime allowed to complete the TLS handshake.
response_header10s10sTime allowed to receive the response headers.
expect_continue1s1sTime to wait for a 100 Continue response.
max_response_bytes00Response body size cap. 0 applies the default cap of 10 MiB; a negative value disables the cap.

overall is an upper bound. Individual operations can have shorter timeouts of their own, so lowering overall shortens every call, but raising it doesn't lengthen an operation that already times out sooner.

TLS for outbound calls​

[controller.http_client.tls]
min_version = "TLS1_2"
max_version = "TLS1_3"
curve_preferences = ""
cipher_suites = ""
root_ca_file = ""
client_cert_file = ""
client_key_file = ""
SettingDefaultDescription
min_version / max_versionTLS1_2 / TLS1_3Bounds the negotiated TLS version.
cipher_suitesEmptyComma-separated IANA cipher suite names; only affects TLS 1.2 and below. Empty applies a secure built-in default set.
curve_preferencesEmptyComma-separated TLS 1.3 key-exchange groups, most preferred first. Empty offers the hybrid post-quantum group X25519MLKEM768 first, followed by classical curves. See Post-quantum cryptography.
root_ca_fileEmptyPEM certificate authority (CA) bundle trusted for the destination's certificate. Empty uses the system root pool.
client_cert_file / client_key_fileEmptyClient certificate and key for mutual TLS (mTLS) to the destination. Set both or neither.

The Gateway Controller's client has no insecure_skip_verify field. It follows controller.controlplane.insecure_skip_verify instead.

Forward proxy​

[controller.http_client.proxy]
mode = "none"
url = ""
username = ""
password = ""
no_proxy = []
egress = ""

[controller.http_client.proxy.tls]
root_ca_file = ""
client_cert_file = ""
client_key_file = ""
insecure_skip_verify = false

mode selects how the client routes outbound calls through a forward proxy:

ModeBehavior
none (default)No proxy. Every call connects directly to its destination.
environmentFollows the standard HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables.
urlRoutes through the proxy at url, authenticating with username/password if set, and bypassing it for any destination matching an entry in no_proxy.

A no_proxy entry is an exact hostname, a .suffix domain match, or a CIDR block, matched case-insensitively.

proxy.tls configures the TLS connection to the proxy itself, when the proxy address is https://. It's independent of the destination TLS settings above, so you can trust a different CA or present a different certificate to the proxy. insecure_skip_verify disables certificate verification for the proxy connection; use it only in a development environment.

egress states how the gateway handles destination checks when a forward proxy is configured:

ValueBehavior
delegatedTrusts the proxy's own egress controls to enforce which destinations are reachable.
manual_connectValidates the destination before sending a CONNECT request to the proxy.

Kubernetes with Helm​

The Helm chart has no structured values for these settings. Set them through gateway.config_toml, which adds raw TOML to the gateway's config.toml. For example:

gateway:
config_toml: |
[controller.http_client.timeouts]
overall = "60s"

[controller.http_client.proxy]
mode = "url"
url = "http://proxy.internal:3128"
no_proxy = [".internal.example.com", "10.0.0.0/8"]

gateway.config_toml is stored in a ConfigMap. Don't put a proxy password in it as a literal value; use an interpolation token such as {{ env "PROXY_PASSWORD" }} and supply the variable to the gateway deployment.

Was this page helpful?