Set a custom user agent for the faraday http client

This commit is contained in:
Tom Hughes 2024-07-05 19:29:06 +01:00
parent 1bc6c2e1dc
commit 3c00ed8dc3

View file

@ -535,7 +535,8 @@ module OSM
# Return the HTTP client to use
def self.http_client
@http_client ||= Faraday.new(:request => { :timeout => 15 })
@http_client ||= Faraday.new(:request => { :timeout => 15 },
:headers => { :user_agent => Settings.server_url })
end
# Return the MaxMindDB database handle