CORS Error

Hi team,

Not able to do a POST request to the below endpoint/API. Kindly advise may be there is a missing CORS setting. https://gorest.co.in/public-api/users

Access to fetch at 'https://gorest.co.in/public-api/users' from origin 'https://mydomain.dummyinternet.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: 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.

you need to test your code from your localhost. browsers will not allow cross origin requests.

I allowed localhost

Please check now it may work for your domain also


Little markdown supported