mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
18 lines
346 B
Ruby
18 lines
346 B
Ruby
# frozen_string_literal: true
|
|
|
|
settings = {
|
|
timeout: 5,
|
|
units: DISTANCE_UNIT,
|
|
cache: Redis.new,
|
|
always_raise: :all,
|
|
cache_options: {
|
|
expiration: 1.day
|
|
}
|
|
}
|
|
|
|
if defined?(PHOTON_API_HOST)
|
|
settings[:lookup] = :photon
|
|
settings[:photon] = { use_https: PHOTON_API_USE_HTTPS, host: PHOTON_API_HOST }
|
|
end
|
|
|
|
Geocoder.configure(settings)
|