CORS error in Next JS #16151
Unanswered
yogthesharma
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have developed a simple e-commerce website using next js , it is working fine on my machine but after deploying it to vercel on every request made to backend it throws a "



Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:3000/api/userAuth. (Reason: CORS request did not _succeed).
" error as also shown in picture. Here is the code from my backend where i tried to resolve my issue.Beta Was this translation helpful? Give feedback.
All reactions