From 4eab6aef95554d74237fcdbe13c986373a643739 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 30 Jul 2024 23:40:42 +0200 Subject: [PATCH] Change User-Agent to use Mastodon as the product, and http.rb as platform details (#31192) --- lib/mastodon/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index 96ad40928..fd05dac7b 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -65,7 +65,7 @@ module Mastodon end def user_agent - @user_agent ||= "#{HTTP::Request::USER_AGENT} (Mastodon/#{Version}; +http#{Rails.configuration.x.use_https ? 's' : ''}://#{Rails.configuration.x.web_domain}/)" + @user_agent ||= "Mastodon/#{Version} (#{HTTP::Request::USER_AGENT}; +http#{Rails.configuration.x.use_https ? 's' : ''}://#{Rails.configuration.x.web_domain}/)" end end end