diff options
author | MIYAGI Hikaru <hcmiya@users.noreply.github.com> | 2018-05-18 08:47:22 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-05-18 01:47:22 +0200 |
commit | 919eef309820a421d6f5886b8ae811d3924cea97 (patch) | |
tree | 0174be003e00cc3addbe3a5e04075eae67c2f7a7 /lib | |
parent | 7293b9fc6190acd6d2a481c158c718a7a8299c73 (diff) |
User agent for WebFinger (#7531)
* User agent for WebFinger * local_domain → web_domain * 'http' is away accidentally...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mastodon/version.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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 |