The project works fine with localhost but when I deploy it to Vercel as separate front-end and back-end projects and try to log in, I keep getting CORS pre-flight errors in the console.
This is the error:
Access to XMLHttpRequest at from origin has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have a HTTP ok status
Would really appreciate it if someone could see where the issue is! I have tried adding headers but that hasn't worked
The project works fine with localhost but when I deploy it to Vercel as separate front-end and back-end projects and try to log in, I keep getting CORS pre-flight errors in the console.
This is the error:
Would really appreciate it if someone could see where the issue is! I have tried adding headers but that hasn't worked