Add use_https option to photon call to fix Issue #333

This commit is contained in:
Christen Lofland 2024-10-17 17:32:16 -05:00
parent 0fcc7bde1a
commit 3bf47ba18d
2 changed files with 2 additions and 1 deletions

View file

@ -3,4 +3,5 @@
MIN_MINUTES_SPENT_IN_CITY = ENV.fetch('MIN_MINUTES_SPENT_IN_CITY', 60).to_i
REVERSE_GEOCODING_ENABLED = ENV.fetch('REVERSE_GEOCODING_ENABLED', 'true') == 'true'
PHOTON_API_HOST = ENV.fetch('PHOTON_API_HOST', nil)
PHOTON_API_USE_HTTPS = ENV.fetch('PHOTON_API_USE_HTTPS', 'true') == 'true'
DISTANCE_UNIT = ENV.fetch('DISTANCE_UNIT', 'km').to_sym

View file

@ -12,7 +12,7 @@ settings = {
if defined?(PHOTON_API_HOST)
settings[:lookup] = :photon
settings[:photon] = { host: PHOTON_API_HOST }
settings[:photon] = { use_https: PHOTON_API_USE_HTTPS, host: PHOTON_API_HOST }
end
Geocoder.configure(settings)