From: ThibG Date: Thu, 9 Jan 2020 23:10:29 +0000 (+0100) Subject: Use quality values in Accept field to explicitly prefer JSON over HTML (#12806) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=c306978190032dd0097d2e48edace33569ddb072;p=mastodon.git Use quality values in Accept field to explicitly prefer JSON over HTML (#12806) --- diff --git a/app/services/fetch_resource_service.rb b/app/services/fetch_resource_service.rb index 34382d279..abe7766d4 100644 --- a/app/services/fetch_resource_service.rb +++ b/app/services/fetch_resource_service.rb @@ -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?