i'm trying to fetch data using axios.
So i init my api like this :
import axios from 'axios';
export default axios.create({
method: 'get',
baseURL: `https://www.data.gouv.fr/fr/datasets/r/a7596877-d7c3-4da6-99c1-2f52d418e881`,
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*'
}
});
But i get 'Access to XMLHttpRequest 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.
Any clue on how to resolve this issue ? Thanks