Merge pull request #338 from chrisl8/master

Add use_https option to photon call to fix Issue #333
This commit is contained in:
Evgenii Burmakin 2024-10-19 12:46:35 +02:00 committed by GitHub
commit 4135e51f41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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)