CORS Policy Error

Access to XMLHttpRequest at ‘https://api.tomtom.com/geofencing/1/projects/porjectid/fences?key=key’ from origin ‘http://127.0.0.1:8000’ has been blocked by CORS policy: The ‘Access-Control-Allow-Origin’ header contains multiple values ‘*, *, 127.0.0.1:8000’, but only one is allowed.

1 Like

Can you describe some more on this?
Which request is making this error?

1 Like

I’m using axios. This is GET request.

here is code:
function getFences() {
return axios
.get(geofencingApiURL + “projects/” + geofencingProjectId + “/fences?key=” + apiKey
)
.then(function(response) {
//console.log(response.data.fences);
return response.data.fences;
})
.catch(function(err) {
displayModal(
"There was an error while fetching fences: " + err.response.data
);
});
}

It looks like a bug. We are looking into it.

1 Like

Hi, thank you for your message.
Problem should be solved by now.

3 Likes

Yes it is solved:)

Thanks