]> cat aescling's git repositories - mastodon.git/commitdiff
Use quality values in Accept field to explicitly prefer JSON over HTML (#12806)
authorThibG <thib@sitedethib.com>
Thu, 9 Jan 2020 23:10:29 +0000 (00:10 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Thu, 9 Jan 2020 23:10:29 +0000 (00:10 +0100)
app/services/fetch_resource_service.rb

index 34382d279a80058545e200fa66e3c8f84739c1c7..abe7766d4f74681fef466b2f52b25ac32bddc6b8 100644 (file)
@@ -3,7 +3,7 @@
 class FetchResourceService < BaseService
   include JsonLdHelper
 
-  ACCEPT_HEADER = 'application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams", text/html'
+  ACCEPT_HEADER = 'application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams", text/html;q=0.1'
 
   def call(url)
     return if url.blank?