Skip to content

Fix 502 on auth callback caused by large Auth.js response headers - #27

Merged
SanjeevLakhwani merged 1 commit into
mainfrom
fix/nginx-large-headers-public-auth-callback
Sep 8, 2026
Merged

SanjeevLakhwani merged 1 commit into
mainfrom
fix/nginx-large-headers-public-auth-callback

Conversation

@SanjeevLakhwani

@SanjeevLakhwani SanjeevLakhwani commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor
  • Allows larger headers for public for larger session cookes created by Auth.js
  • keycloak already has it

Auth.js's /api/auth/callback/bento response sets several large
JWE-encrypted cookies at once, exceeding nginx's default proxy
buffer size and causing nginx to drop the response instead of
relaying it to the browser. Wire up proxy_large_headers.conf in
the public location block, same as is already done for Keycloak.
@SanjeevLakhwani
SanjeevLakhwani force-pushed the fix/nginx-large-headers-public-auth-callback branch from 07e51f1 to 108883d Compare September 8, 2026 13:52
@SanjeevLakhwani
SanjeevLakhwani marked this pull request as ready for review September 8, 2026 13:56

@davidlougheed davidlougheed left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@SanjeevLakhwani
SanjeevLakhwani merged commit 51c22ec into main Sep 8, 2026
1 check passed
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