DEV Community

Pranjal
Pranjal

Posted on

I am getting a CORS error while accessing api in react

Error- Access to fetch at 'http://......' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.

The header already contains- Access-Control-Allow-Origin': '*'. I can see that in postman. still i am getting the above error. How do I solve this issue?

Top comments (0)