Skip to content

Commit

Permalink
Add use_https option to photon call to fix Issue Freika#333
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisl8 committed Oct 17, 2024
1 parent 0fcc7bd commit 3bf47ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/initializers/00_constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion config/initializers/geocoder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

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)

0 comments on commit 3bf47ba

Please sign in to comment.