The solution to the 400 Bad Request Request Header or Cookie Too Large error on the page
In the process of developing a project, I suddenly encountered the 400 Bad Request Request Header Or Cookie Too Large error, which is also the first time I have such an error, and it feels quite novel.
Analyze the reasons for the error:
Caused by a request header that is too large, usually caused by a large value written in the cookie.
Solution:
If you use nginx server, modify the method:
/usr/local/nginx/conf
Below this path, modify nginx.conf
http
{
include mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 128;
client_header_buffer_size 16k; //The default here is 4K, just make it bigger
large_client_header_buffers 4 32k; //It would be nice to make it bigger
} 
Leave a Reply