Hi all! We implemented OpenStreetMap.org and it works great, but we get a CORS error, see below, after searching. We added the below code to the htacces, but it does'nt seem to work. We just can't find the solution and hope someone can help us :-) ERROR Access to XMLHttpRequest at 'https://nominatim.openstreetmap.org/search?format=json&q=President%20Allendelaan%202,%201064GW%20Amsterdam' from origin 'https://www.frituurvetrecyclehet.nl' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. HTACCESS <ifmodule mod_headers.c=""> Header set Access-Control-Allow-Origin https://nominatim.openstreetmap.org Header set Access-Control-Allow-Credentials true </ifmodule> Any help is appreciated! asked 21 Oct '21, 09:14 Internetbure... |
When you see a CORS issue like that with nominatim.openstreetmap.org then the underlying issue is likely that you have been blocked for some reason. The site sends proper CORS headers with normal responses but it does not send them when returning a HTTP 403 or 429. Check your logs for HTTP errors. answered 21 Oct '21, 09:51 lonvia Ah, thanks, but is there a way to check? We notice that we get 10 results without the error, and the 11th result gives the error. Any suggestion on how to fix this?
(22 Oct '21, 09:14)
Internetbure...
1
The simplest way to fix this is to respect the Usage policy of the service and make sure to not send more than 1req/s. If that is not enough for you you will need to run your own instance of Nominatim.
(22 Oct '21, 10:29)
lonvia
|