In our project, we have Kong version 1.1 with Kong Ingress controller 0.3 version.
At an instance in the application, the request header size is going above 8k. Hence we are getting “Header too long”.
We tried setting up #client_max_body_size = 16k, by setting KONG_CLIENT_MAX_BODY_SIZE in as the environment variable but it is not getting reflected. While starting the kong in debug mode it is showing client_max_body_size=16k, but while serving a request it is throwing
Header too long error.
As explained by you, I tried setting up #large_client_header_buffers by setting up env environment with the help of Nginx directive injection mechanism. I have assigned following,
The changes have been reflected in .kong_env, but still the issue is not resolved.
Here are the changes reflected in .kong_env
# *************************
# * DO NOT EDIT THIS FILE *
# *************************
# This configuration file is auto-generated. If you want to modify
# the Kong configuration please edit/create the original `kong.conf`
# file. Any modifications made here will be lost.
# Start Kong with `--vv` to show where it is looking for that file.
plugins = bundled
admin_listen = off
nginx_proxy_large_client_header_buffers = 8 24k
The Request header size is : Request Headers (8.401 KB)
Response error: Status Code: 431 Request Header Fields Too Large
Kindly validate if I have set it right. Thanks in advance.