From: ik-fib Date: Fri, 21 Apr 2017 15:26:23 +0000 (+0900) Subject: Add Mastodon version to user agent (#2253) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=47a3036ea6ade308c34b47301ddfe8196da6cf51;p=mastodon.git Add Mastodon version to user agent (#2253) --- diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb index 5ab781bfc..f24ebb82b 100644 --- a/app/services/fetch_link_card_service.rb +++ b/app/services/fetch_link_card_service.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class FetchLinkCardService < BaseService - USER_AGENT = "#{HTTP::Request::USER_AGENT} (Mastodon; +http://#{Rails.configuration.x.local_domain}/)" + USER_AGENT = "#{HTTP::Request::USER_AGENT} (Mastodon/#{Mastodon::VERSION}; +http://#{Rails.configuration.x.local_domain}/)" def call(status) # Get first http/https URL that isn't local