Skip to content
Extraits de code Groupes Projets
Valider 2fba94b3 rédigé par haoyayoi's avatar haoyayoi Validation de Eugen Rochko
Parcourir les fichiers

add content-type in pubsubhubhub request header (#2943)

* add content-type in pubsubhubhub request header

* fix type
parent 8c9116dc
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -18,6 +18,7 @@ class Pubsubhubbub::DeliveryWorker ...@@ -18,6 +18,7 @@ class Pubsubhubbub::DeliveryWorker
return if DomainBlock.blocked?(host) return if DomainBlock.blocked?(host)
headers['User-Agent'] = 'Mastodon/PubSubHubbub' headers['User-Agent'] = 'Mastodon/PubSubHubbub'
headers['Content-Type'] = 'application/atom+xml'
headers['Link'] = LinkHeader.new([[api_push_url, [%w(rel hub)]], [account_url(subscription.account, format: :atom), [%w(rel self)]]]).to_s headers['Link'] = LinkHeader.new([[api_push_url, [%w(rel hub)]], [account_url(subscription.account, format: :atom), [%w(rel self)]]]).to_s
headers['X-Hub-Signature'] = signature(subscription.secret, payload) if subscription.secret? headers['X-Hub-Signature'] = signature(subscription.secret, payload) if subscription.secret?
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter