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... --- app/lib/request.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/lib') diff --git a/app/lib/request.rb b/app/lib/request.rb index 731bf7687..397614fac 100644 --- a/app/lib/request.rb +++ b/app/lib/request.rb @@ -58,7 +58,7 @@ class Request def set_common_headers! @headers[REQUEST_TARGET] = "#{@verb} #{@url.path}" - @headers['User-Agent'] = user_agent + @headers['User-Agent'] = Mastodon::Version.user_agent @headers['Host'] = @url.host @headers['Date'] = Time.now.utc.httpdate @headers['Accept-Encoding'] = 'gzip' if @verb != :head @@ -83,10 +83,6 @@ class Request @headers.keys.join(' ').downcase end - def user_agent - @user_agent ||= "#{HTTP::Request::USER_AGENT} (Mastodon/#{Mastodon::Version}; +#{root_url})" - end - def key_id case @key_id_format when :acct -- cgit