We had a problem when our cookies reach a certain size (more than 7 thousand), where nginx returns 400 Bad Request with an empty response when proxing to our tomcat. This does not happen when nginx serves static content. We have already tried to update the nginx configuration in order to increase the buffer size so that it processes individual headers to 16k (we also tried to set it at the server level):
http {
We also increased the file size of tomcat max-http-header to 16k. If we increase the size of the cookie to more than 16k, we still receive 400 requests, but the response has the error message โRequest Header or Cookie Too Largeโ. Something strange happens between the sizes of the 8k and 16k headers, which we cannot understand.
cnaut source share