From fb393da352afd6c0ca41a9e6795f955b37a1db06 Mon Sep 17 00:00:00 2001 From: Bo Sundgaard <46848138+bosund@users.noreply.github.com> Date: Sat, 5 Sep 2026 13:00:04 +0200 Subject: [PATCH] fix(docker): raise nginx request header buffers above the 8k default (#11404) Co-authored-by: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> --- docker/development/etc/nginx/conf.d/custom.conf | 6 ++++++ docker/production/etc/nginx/conf.d/custom.conf | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/docker/development/etc/nginx/conf.d/custom.conf b/docker/development/etc/nginx/conf.d/custom.conf index f26dc3049..4672e3de5 100644 --- a/docker/development/etc/nginx/conf.d/custom.conf +++ b/docker/development/etc/nginx/conf.d/custom.conf @@ -2,3 +2,9 @@ # Disable access logs access_log off; + +# Allow request headers up to 32k (nginx default is 8k). Large JWT cookies can push the +# Cookie header past 8k, and nginx would then reject the request with a bare 400 +# before it reaches the application. +client_header_buffer_size 8k; +large_client_header_buffers 8 32k; diff --git a/docker/production/etc/nginx/conf.d/custom.conf b/docker/production/etc/nginx/conf.d/custom.conf index f26dc3049..4672e3de5 100644 --- a/docker/production/etc/nginx/conf.d/custom.conf +++ b/docker/production/etc/nginx/conf.d/custom.conf @@ -2,3 +2,9 @@ # Disable access logs access_log off; + +# Allow request headers up to 32k (nginx default is 8k). Large JWT cookies can push the +# Cookie header past 8k, and nginx would then reject the request with a bare 400 +# before it reaches the application. +client_header_buffer_size 8k; +large_client_header_buffers 8 32k;