CORS policy nextjs 13.4 vercel
Unanswered
Orchard Oriole posted this in #help-forum
Orchard OrioleOP
I have a nextjs 13.4 application hosted on vercel. The backend is build using nextjs api routes in app folder, so everything is contained on the same domain. But I still seem to get the cors error: cess to fetch at 'https://domain.com/api/signup' from origin 'https://domain.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.
I have tried following this guide: https://vercel.com/guides/how-to-enable-cors, a few videos and github posts.
Does anyone know why this happens?
I have tried following this guide: https://vercel.com/guides/how-to-enable-cors, a few videos and github posts.
Does anyone know why this happens?
2 Replies
Orchard OrioleOP
It seems to me that it is only some routes that are affected by this problem, but i can't really seem to find any sort of pattern in them.
Cape lion
@Orchard Oriole do you have some sort of middleware in your app?