Answer the question
In order to leave comments, you need to log in
Acsess-Control-Allow-Origin error?
I created an example folder in openserver which will contain the backend of my site on react. In react, I performed fetch example/goods.php to get a list of products from there in the console, I see an error. Please help me decide.
Access to fetch at 'http://example/goods.php' 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.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question