From c306978190032dd0097d2e48edace33569ddb072 Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 10 Jan 2020 00:10:29 +0100 Subject: [PATCH] Use quality values in Accept field to explicitly prefer JSON over HTML (#12806) --- app/services/fetch_resource_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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?