Use quality values in Accept field to explicitly prefer JSON over HTML (#12806)

lolsob-rspec
ThibG 2020-01-10 00:10:29 +01:00 committed by Eugen Rochko
parent 5fbadcf9df
commit 057764b126
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@
class FetchResourceService < BaseService class FetchResourceService < BaseService
include JsonLdHelper 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) def call(url)
return if url.blank? return if url.blank?