From 919eef309820a421d6f5886b8ae811d3924cea97 Mon Sep 17 00:00:00 2001 From: MIYAGI Hikaru Date: Fri, 18 May 2018 08:47:22 +0900 Subject: User agent for WebFinger (#7531) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * User agent for WebFinger * local_domain → web_domain * 'http' is away accidentally... --- lib/mastodon/version.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index 697f317d8..874dfedb7 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -48,5 +48,9 @@ module Mastodon source_base_url end end + + def user_agent + @user_agent ||= "#{HTTP::Request::USER_AGENT} (Mastodon/#{Version}; +http#{Rails.configuration.x.use_https ? 's' : ''}://#{Rails.configuration.x.web_domain}/)" + end end end -- cgit