numero2 / contao-storelocator

Contao Plugin for managing stores (or in common address data) and providing a frontend-search based on geo data.
https://www.numero2.de/contao/erweiterungen/storelocator.html
GNU Lesser General Public License v3.0
13 stars 8 forks source link

GeocodeAPI and Google's restrictions #44

Closed stefansl closed 3 years ago

stefansl commented 3 years ago

If you want to restrict your Google API key on referer urls the Geocode API will not work. Google needs a restriction on IPs -> https://developers.google.com/maps/documentation/geocoding/get-api-key?hl=de

So. If I restrict the API key to my server IP Geocode works, but the Maps API fails, because you need to restrict that key on referer urls.

That's gonna be complicated, because in fact we need two API keys to let it work properly.

bennyborn commented 3 years ago

I don't think I'm quite getting the point of your problem. We already have two API keys for the exact same reason. One server key (which should be restricted by IP) and one browser key (that should be restricted by referer).

stefansl commented 3 years ago

What the heck :D You're right ... sorry for the noise