Next-Auth Sends "text/plain" Content-Type, Blocked by WAF #12726
Unanswered
MHBahrampour
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
When Next-Auth sends the login form data to the Next.js backend (API routes), the request gets blocked by our WAF because the
Content-Type
is set totext/plain;charset=UTF-8
.If I capture the request via curl and manually change the
Content-Type
toapplication/json
, it successfully passes through the WAF and reaches the Next.js backend, then I call out API endpoint inauthorize
method.Is there a way to modify the
Content-Type
for Next-Auth’s request?Note: The issue is not with the API request I make manually—those are correctly set to
application/json
.Related Code
📂 package.json
📂 src/app/api/auth/[...nextauth]/route.ts
📂 src/services/login-services.ts
📂 src/services/auth.ts
📂 /src/services/login-actions.ts
Beta Was this translation helpful? Give feedback.
All reactions