KONG_ALLOW_DEBUG_HEADER
Default: off
|
Enable the Kong-Debug header function.
If it is on, Kong will add
Kong-Route-Id, Kong-Route-Name, Kong-Service-Id,
and Kong-Service-Name debug headers to the response when
the client request header Kong-Debug: 1 is present.
|
KONG_HEADERS
Default: server_tokens, latency_tokens, X-Kong-Request-Id
|
Comma-separated list of headers Kong should
inject in client responses.
Accepted values are:
-
Server: Injects Server: kong/x.y.z
on Kong-produced responses (e.g., Admin
API, rejected requests from auth plugin).
-
Via: Injects Via: kong/x.y.z for
successfully proxied requests.
-
X-Kong-Proxy-Latency: Time taken
(in milliseconds) by Kong to process
a request and run all plugins before
proxying the request upstream.
-
X-Kong-Response-Latency: Time taken
(in milliseconds) by Kong to produce
a response in case of, e.g., a plugin
short-circuiting the request, or in
case of an error.
-
X-Kong-Upstream-Latency: Time taken
(in milliseconds) by the upstream
service to send response headers.
-
X-Kong-Admin-Latency: Time taken
(in milliseconds) by Kong to process
an Admin API request.
-
X-Kong-Upstream-Status: The HTTP status
code returned by the upstream service.
This is particularly useful for clients to
distinguish upstream statuses if the
response is rewritten by a plugin.
-
X-Kong-Request-Id: Unique identifier of
the request.
-
X-Kong-Total-Latency: Time elapsed
(in milliseconds) between the first bytes
being read from the client and the log
write after the last bytes were sent to
the client. Calculated as the difference
between the current timestamp and the
timestamp when the request was created.
-
X-Kong-Third-Party-Latency: Cumulative
sum of all third-party latencies, including
DNS resolution, HTTP client calls, Socket
operations, and Redis operations.
-
X-Kong-Client-Latency: Time that Kong waits
to receive headers and body from the client, and
also how long Kong waits for the client to
read/receive the response from Kong.
-
server_tokens: Same as specifying both
Server and Via.
-
latency_tokens: Same as specifying
X-Kong-Proxy-Latency,
X-Kong-Response-Latency,
X-Kong-Admin-Latency, and
X-Kong-Upstream-Latency.
-
advanced_latency_tokens: Same as specifying
X-Kong-Proxy-Latency,
X-Kong-Response-Latency,
X-Kong-Admin-Latency,
X-Kong-Upstream-Latency.
X-Kong-Total-Latency,
X-Kong-Third-Party-Latency, and
X-Kong-Client-Latency.
In addition to these, this value can be set
to off, which prevents Kong from injecting
any of the above headers. Note that this
does not prevent plugins from injecting
headers of their own.
Example: headers = via, latency_tokens
|
KONG_HEADER_UPSTREAM
|
Comma-separated list of headers Kong should inject in requests to upstream.
At this time, the only accepted value is:
-
X-Kong-Request-Id: Unique identifier of the request.
In addition, this value can be set to off, which prevents Kong from injecting the above header. Note that this does not prevent plugins from injecting headers of their own.
|
KONG_LATENCY_TOKENS
|
Removes the latency information from the HTTP response headers.
|
KONG_LOG_LEVEL
Default: notice
|
Log level of the data plane node.
The logs are available in Konnect, in the Logs tab of the data plane node.
|
KONG_REAL_IP_HEADER
Default: X-Real-IP
|
Defines the request header field whose value
will be used to replace the client address.
This value sets the ngx_http_realip_module
directive of the same name in the Nginx
configuration.
If this value receives proxy_protocol:
- at least one of the
proxy_listen entries
must have the proxy_protocol flag
enabled.
- the
proxy_protocol parameter will be
appended to the listen directive of the
Nginx template.
See http://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_header
for a description of this directive.
|
KONG_REAL_IP_RECURSIVE
Default: off
|
This value sets the ngx_http_realip_module
directive of the same name in the Nginx
configuration.
See http://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_recursive
for a description of this directive.
|
KONG_REQUEST_DEBUG_TOKEN
Default:
|
The Request Debug Token is used in the
X-Kong-Request-Debug-Token header to prevent abuse.
If this value is not set (the default),
a random token will be generated
when Kong starts, restarts, or reloads. If a token is
specified manually, then the provided token will be used.
You can locate the generated debug token in two locations:
- Kong error log:
Debug token will be logged in the error log (notice level)
when Kong starts, restarts, or reloads.
The log line will have the:
[request-debug] prefix to aid searching.
- Filesystem:
Debug token will also be stored in a file located at
{prefix}/.request_debug_token and updated
when Kong starts, restarts, or reloads.
|
KONG_SERVER_TOKENS
|
Removes the Kong version information from the HTTP response headers.
|
KONG_TRACING_INSTRUMENTATIONS
Default: off
|
Comma-separated list of tracing instrumentations this node should load.
By default, no instrumentations are enabled.
Valid values for this setting are:
-
off: do not enable instrumentations.
-
request: only enable request-level instrumentations.
-
all: enable all the following instrumentations.
-
db_query: trace database queries.
-
dns_query: trace DNS queries.
-
router: trace router execution, including router rebuilding.
-
http_client: trace OpenResty HTTP client requests.
-
balancer: trace balancer retries.
-
plugin_rewrite: trace plugin iterator execution with rewrite phase.
-
plugin_access: trace plugin iterator execution with access phase.
-
plugin_header_filter: trace plugin iterator execution with header_filter phase.
Note: In the current implementation, tracing instrumentations are not enabled in stream mode.
|
KONG_TRACING_SAMPLING_RATE
Default: 0.01
|
Tracing instrumentation sampling rate.
Tracer samples a fixed percentage of all spans
following the sampling rate.
Example: 0.25, this accounts for 25% of all traces.
|
KONG_TRUSTED_IPS
|
Defines trusted IP address blocks that are
known to send correct X-Forwarded-*
headers.
Requests from trusted IPs make Kong forward
their X-Forwarded-* headers upstream.
Non-trusted requests make Kong insert its
own X-Forwarded-* headers.
This property also sets the
set_real_ip_from directive(s) in the Nginx
configuration. It accepts the same type of
values (CIDR blocks) but as a
comma-separated list.
To trust all IPs, set this value to
0.0.0.0/0,::/0.
If the special value unix: is specified,
all UNIX-domain sockets will be trusted.
See http://nginx.org/en/docs/http/ngx_http_realip_module.html#set_real_ip_from
for examples of accepted values.
|
KONG_UNTRUSTED_LUA_SANDBOX_REQUIRES
|
Comma-separated list of modules allowed to
be loaded with require inside the
sandboxed environment. Ignored
if untrusted_lua is not sandbox.
For example, say you have configured the
Serverless pre-function plugin and it
contains the following requires:
local template = require "resty.template"
local split = require "kong.tools.string".split
To run the plugin, add the modules to the
allowed list:
untrusted_lua_sandbox_requires = resty.template, kong.tools.utils
Warning: Allowing certain modules may
create opportunities to escape the
sandbox. For example, allowing os or
luaposix may be unsafe.
|