Replies: 1 comment
-
Do you need auth on that endpoint? If not, check out the Next.js docs on how to exclude pages from the Middleware matching via the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Question 💬
Hello,
Next-auth middleware is blocking my requests that contain files within the formData.
I have implemented next-auth with the default middleware settings and have an
api/images
route to accept the image upload request.Here is my request:
The request ends up indefinitely stuck on pending and the API never receives the request -
with nothing appearing in the client/server logs.
If I remove the
formData.append('file', file);
line then the request recieved.I thought this would be an issue with the file size but this happens with files around 20kb in size.
How to reproduce ☕️
api/[...nextAuth].js
middleware.ts
export { default } from 'next-auth/middleware';
api/images/index.ts
frontend request
Contributing 🙌🏽
No, I am afraid I cannot help regarding this
Beta Was this translation helpful? Give feedback.
All reactions