New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content-length header is sent to the server with empty value in Next.js 13 route handler. #514
Comments
Anyone? |
don't know the exact reason I faced the same issue. It's definitely has to do something related to nextjs's wrap around the fetch (to handle cache) which is globally available. |
@mabdullahadeel No problem.
|
I'm using nextjs 13 with new app router and next-auth. My authorize method in CredentialsProvider looks like this:
Here is the body of the loginUser method
And server gets empty request payload because header
content-length
is empty ("").When I add it manually it suddenly works.
headers: { 'content-type': 'application/json', 'content-length': JSON.stringify(values).length + '' },
Does someone knows why that is happening?
The text was updated successfully, but these errors were encountered: