Page 1 of 1

OSMR routing blocked by CORS policy: No 'Access-Control-Allow-Origin'

Posted: 19 Oct 2019, 20:44
by athco
Hi,

I try to use OSM routing, but no success. I have a valid access token from Mapbox, use "http://map.project-osrm.org" as Router Service, but I get the following error:

Access to XMLHttpRequest at 'https://router.project-osrm.org/route/v ... rue&hints=;' from origin 'https://tokrimini.gr' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Website is developed on a provider and I don't have access to setup my own OSMR server, or even use a proxy.
What can I do?

Thank you very much in advance...

Re: OSMR routing blocked by CORS policy: No 'Access-Control-Allow-Origin'

Posted: 19 Oct 2019, 21:21
by athco
Hi,

Finally solved it by myself.
Mapbox is not needed. Used openrouteservice.org as Router Service and applied the key I got from https://openrouteservice.org.

Thank you all...

Re: OSMR routing blocked by CORS policy: No 'Access-Control-Allow-Origin'

Posted: 19 Oct 2019, 23:45
by Benno
Ok.

Kind regards,
Benno