During the Auth0 token exchange process I am seeing 502 Bad Gateway errors triggered by Nginx as it attempts to proxy the response from Auth0 to my server.
The Nginx error log complains that the response header is too large:
upstream sent too big header while reading response header from upstream
The default proxy buffer limit in Nginx is between 32KB and 64KB which should be plenty big for a response.
A few questions:
- Why might Auth0 create large response headers which are in excess of these limits?
- Does Auth0 recommend disabling response buffering completely?
- If not, what is the maximum possible response size and/or the recommended buffer size limit?
Thanks