I am able to hit an sample endpoint via
fetch and display the data in the UI. But for some endpoints, the request is
getting blocked by CORS policy
I also tried to add
"proxy" : "endpoint_link" in
package.json and also tried to add
allow Access Origin in the headers section but the issue still persists
This is the console log I am getting
Access to fetch at 'http://localhost:8000/header' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Please suggest how to overcome this during development as I have tried all possible ways.