Skip to content

Commit

Permalink
add content-type in pubsubhubhub request header (mastodon#2943)
Browse files Browse the repository at this point in the history
* add content-type in pubsubhubhub request header

* fix type
  • Loading branch information
haoyayoi authored and Gargron committed May 9, 2017
1 parent 8c9116d commit 2fba94b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/workers/pubsubhubbub/delivery_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def perform(subscription_id, payload)
return if DomainBlock.blocked?(host)

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['X-Hub-Signature'] = signature(subscription.secret, payload) if subscription.secret?

Expand Down

0 comments on commit 2fba94b

Please sign in to comment.