I'm using an Axios module in my React app, and I am using to API POST method.
Like this:
axios.request({
method: "POST",
url,
responseType: "jsonp",
data: payload,
...config
});
But I get an error:
Access to XMLHttpRequest at 'http://0.0.0.0/api/ak' from origin 'http://localhost:3000' 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. xhr.js:160 POST http://0.0.0.0/api/ak net::ERR_FAILED
Where am I wrong?