Contact Us 1-800-596-4880

Configure Flex Gateway Environment Variables in Local Mode

Flex Gateway provides these environment variables to configure your gateway:

Variable Name Default Value Description

FLEX_CONNECTION_IDLE_TIMEOUT_SECONDS

60

Maximum number of seconds a connection can be idle before it times out. For more information, see Configuring Timeouts in Local Mode.

FLEX_STREAM_IDLE_TIMEOUT_SECONDS

300

Maximum number of seconds a stream can remain idle without receiving any data in either the inbound (client to Flex Gateway) or outbound (Flex Gateway to upstream service) direction. For more information, see Configuring Timeouts in Local Mode.

FLEX_UPSTREAM_CONNECTION_IDLE_TIMEOUT_SECONDS

60

Maximum number of seconds a stream between Flex Gateway and the upstream service can remain idle between requests. For more information, see Configuring Timeouts in Local Mode.

FLEX_UPSTREAM_RESPONSE_TIMEOUT_SECONDS

15

Maximum number of seconds a Flex Gateway waits for a response from an upstream service. For more information, see Configuring Timeouts in Local Mode.

FLEX_ENVOY_HEADERS_ENABLED

false

Allows (true) or removes (false) Envoy headers from requests. For more information, see Requirements and Limits for Flex Gateway.

FLEX_REWRITE_HOST_HEADER

true

Rewrite HTTP Host header to match upstream.

FLEX_REMOVE_SERVER_HEADER

false

Removes the Server HTTP response header from outbound responses when set to true. Set to true to reduce exposure of server implementation details for security or compliance purposes.

FLEX_HEADER_RAW_VALUE_ENABLE

`tru`e

Controls header encoding for external authorization. Set to false to send headers encoded in UTF-8. For more information, see External Authorization Policy.

FLEX_FORWARD_CLIENT_CERT_DETAILS

SANITIZE

Controls how the x-forwarded-client-cert (XFCC) HTTP header is handled. Supported values are SANITIZE, FORWARD_ONLY, APPEND_FORWARD, SANITIZE_SET, and ALWAYS_FORWARD_ONLY. For more information, see HTTP connection manager (proto) in the Envoy documentation.

FLEX_DOWNSTREAM_CONNECTION_BUFFER_LIMIT_BYTES

1048576 (1 MB)

Maximum size, in bytes, of read and write buffers for new connections. For more information, see Requirements and Limits for Flex Gateway.

FLEX_DATASOURCE_CONTROL_NODE_ENABLED

false

Enable configuration caching in Redis shared storage for Connected Mode replicas. For more information, see Configuring Flex Gateway Configuration Caching in Connected Mode.

FLEX_SERVICE_ENVOY_DRAIN_TIME

25

Drain period in seconds during shutdown before Flex Gateway exits gracefully. For more information, see Monitoring in Local Mode.

FLEX_SYNC_DEBOUNCE_TIME

"5s"

Specifies the amount of time to wait after detecting a configuration change before applying it. This prevents excessive reloading during rapid successive changes. The value must be a valid duration string, such as "5s" or "500ms".

FLEX_LOG_LEVEL

4 (INFO)

Sets the logging level for Flex Gateway. For the environment variable configuration of log level, you specify a number that corresponds to the log level. Supported values are NONE:`-1`, FATAL:`0`, ERROR:`1`, WARN:`2`, INFO:`4`, DEBUG:`8`, and TRACE:`16`.

FLEX_CONFIG

N/A

Provides Flex Gateway registration and configuration as a YAML-formatted string. The YAML content must be properly escaped to preserve special characters. Provide your registration and configuration as a string if deploying environments where file mounting isn’t practical, such as Amazon ECS or Azure Container Apps.