nginxdjango-rest-frameworknginx-reverse-proxy

Error parsing headers: 'limit request headers fields size' in Nginx


I have deployed my django app with Nginx, I use Jwt Authorization and the token may grow. Initially I was getting Request Header Or Cookie Too Large so I googled and find some docs that tells to increase client_header_buffer_size, so I did that and set to client_header_buffer_size 32k and the error changed to **Bad Request** Error parsing headers: 'limit request headers fields size'

Below is my configs

server {
   ......
   client_header_buffer_size 32k
   ......
}

Any help will be appreciated guys I have to deploy. Thanks in Advance


Solution

  • After struggled for sometimes I found a solution , so the actual problem was I was passing a large jwt token through headers so I had to minimize data that I used to store in my encoded token. That solved my issue