Search code examples
kubernetesnginx-ingress

kubernetes nginx ingress Request Header Or Cookie Too Large


My nginx-ingress-controller is in the ingress-nginx namespace and I've set the large-client-header-buffers to 4 16k, 4 32k etc.

kind: ConfigMap
apiVersion: v1
metadata:
  name: nginx-configuration
  namespace: ingress-nginx  
data:
  proxy-buffer-size: "16k"
  large-client-header-buffers: "4 16k"

When I inspect the configuration in the nginx-controller pod I see:

 kubectl exec -n ingress-nginx nginx-ingress-controller-65fd579494-jptxh cat /etc/nginx/nginx.conf | grep large_client_header
        large_client_header_buffers     4 16k;

So everything seems to be configured correctly, still I get the error message 400 Bad Request Request Header Or Cookie Too Large


Solution

  • There is dedicated topic on github about the problem. You can find there possible solutions. This problem should be completely removed based on this issue.

    Look also at more tutorials how can you solve this problem, but from the browser site: