From 3c00ed8dc3ed2ef53e5a818abd033c905bc62c6e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 5 Jul 2024 19:29:06 +0100 Subject: [PATCH] Set a custom user agent for the faraday http client --- lib/osm.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/osm.rb b/lib/osm.rb index dd273418e..46f37036f 100644 --- a/lib/osm.rb +++ b/lib/osm.rb @@ -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 -- 2.39.5