I am using Pixabay API to get data. Everything is working fine, but I get some warning in my console.
axios.get(url).then(res =>
dispatch({
type: GET_STOCK,
payload: {
tag,
page: page + 1,
images: res.data.hits
}
})
);
Warnings are
Access to XMLHttpRequest at 'https://pixabay.com/api/?key=my_key_is_here' from origin 'http://localhost:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I tried to set header and some options in my axios function.