Allow restrictions

Created on 12 June 2022, over 2 years ago
Updated 22 May 2023, over 1 year ago

This module works amazingly, but one major improvement would be to make it compatible with certain restrictions.

Currently, I have this set up to use GoogleMaps, but enabling any restriction breaks the geocoding.

I've tried to add the "HTTP referrers (web sites)" restriction, using the values for my domain as:
*.mydomain.com/*

But this seems to still deny access? As most of the comprehensively reliable geocoding services cost after some point, it would be great to ensure that only the sites we wish to use the service are allowed.

Feature request
Status

Closed: won't fix

Version

3.0

Component

Code

Created by

🇺🇸United States w01f

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States bcobin

    It took me a while to get geocoding from the addressfield working and it included setting up a paid Google account. I dopn't expect to ever generate enough page hits to pay (this is strictly for dev purposes), but having to create a paid account with an unrestricted key is scary.

    Restricting by IP seems to work, though. Just passing this along...

  • Status changed to Closed: won't fix over 1 year ago
  • 🇮🇹Italy itamair

    Thanks ...
    BUT It is not the Drupal Geocoder module in charge of enabling or disabling the Google Maps API Key restrictions.
    Any/all of those restrictions should work based on your Google Console settings, both on the domain and the IPs, etc,
    because it is still a matter of http servers request/response logics ... that's it.
    And of course all this could be very specific to Google Maps ... and not to the other many providers this module supports.
    So indeed this looks out of scope of this Drupal module, hence closing this accordingly.

  • 🇺🇸United States w01f

    Just following up I still couldn't figure out how to make the "Website" url restriction work, after trying every variation on my domain I could think of.

    Finally opting for IP restriction as bcobin suggested in combination with restricting it to just the Geocoding API one.

Production build 0.71.5 2024