Fix Accept header for requesting ActivityPub objects

This is the header described in the ActivityPub spec, which should fix
some federation problems with GoToSocial and potentially other picky
services.

Related: #2794, superseriousbusiness/gotosocial#1676
This commit is contained in:
Wesley Aptekar-Cassels 2023-04-07 05:51:00 -04:00
parent 4b1012b185
commit 912d0a0149

View file

@ -384,7 +384,8 @@ def get_activitypub_data(url):
resp = requests.get(
url,
headers={
"Accept": "application/json; charset=utf-8",
# pylint: disable=line-too-long
"Accept": 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
"Date": now,
"Signature": make_signature("get", sender, url, now),
},