The solution to the 400 Bad Request Request Header Or Cookie Too Large error on the webpage

In the process of developing the project, I suddenly encountered an error of 400 Bad Request Request Header Or Cookie Too Large. This is the first time I have such an error, and it feels quite novel.

Analyze the reason for the error:

Caused by the request header is too large, the request is too large, usually caused by a large value written in the cookie.

Solution:

If you use nginx server, the modification method:

/usr/local/ nginx /conf

Under 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; //这里默认是4K,改大一点就好了large_client_header_buffers 4 32k; //改大一点就好了} Instance configuration:
 http { ********** client_header_buffer_size

The post The solution to the 400 Bad Request Request Header Or Cookie Too Large error appeared first on Lenix Blog .

This article is reprinted from https://blog.p2hp.com/archives/9175
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment