⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@mariayord
Copy link
Contributor

@mariayord mariayord commented Feb 9, 2026

| | Explanation |
|--------------|----------------------------------------------------------------------------------------------------------------------|
| _Root Cause_ | `431` occurs when the size of the request headers exceeds the maximum limit configured in the Node.js HTTP server. In this case, Node.js rejects the request during the initial parsing phase, before it reaches the application, middleware, or logging logic. Therefore, the request is not processed or logged by the application. |
| _Solution_ | Inspect the request headers and check their size, especially the Authorization header for large `JWT` tokens. Reduce the header size if possible (for example, by removing unnecessary roles or attributes). If large headers are required and cannot be reduced, increase the maximum allowed HTTP header size in Node.js by setting the following environment variable `NODE_OPTIONS="--max-http-header-size=65536"` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd leave out the jwt and roles. That's specific to one possible root cause.

mariayord and others added 3 commits February 10, 2026 15:37
Co-authored-by: Johannes Vogel <31311694+johannes-vogel@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants