about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-07-07 15:34:00 +0200
committerThibaut Girka <thib@sitedethib.com>2020-07-07 15:58:45 +0200
commite9ad99bc93b6f65277956d997792ec40f08165cb (patch)
treece71714d2d0d680adecf070cb4e698f3a6984b56 /app/services
parent94e09d309cb068ea92919767e40e655260ac43cb (diff)
parent6e25574ce599cbc37b7215ded03c7d07208af6bb (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- `package.json`:
  Not really a conflict, just some glitch-soc-specific dependency
  too close to an upstream-updated one.
Diffstat (limited to 'app/services')
-rw-r--r--app/services/fetch_link_card_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb
index 91141c1f5..beab449b2 100644
--- a/app/services/fetch_link_card_service.rb
+++ b/app/services/fetch_link_card_service.rb
@@ -45,7 +45,7 @@ class FetchLinkCardService < BaseService
   def html
     return @html if defined?(@html)
 
-    Request.new(:get, @url).add_headers('Accept' => 'text/html').perform do |res|
+    Request.new(:get, @url).add_headers('Accept' => 'text/html', 'User-Agent' => Mastodon::Version.user_agent + ' Bot').perform do |res|
       if res.code == 200 && res.mime_type == 'text/html'
         @html = res.body_with_limit
         @html_charset = res.charset