Add BookWyrm user-agent to http requests
This allows other software to identify BookWyrm in calls, as well as will allow BookWyrm to differentiate between calls done from other fediverse software and BookWyrm to answer with specific BookWyrm data.
This commit is contained in:
@ -3,7 +3,7 @@ import json
|
||||
from django.utils.http import http_date
|
||||
import requests
|
||||
|
||||
from bookwyrm import models
|
||||
from bookwyrm import models, settings
|
||||
from bookwyrm.activitypub import ActivityEncoder
|
||||
from bookwyrm.tasks import app
|
||||
from bookwyrm.signatures import make_signature, make_digest
|
||||
@ -79,6 +79,7 @@ def sign_and_send(sender, data, destination):
|
||||
'Digest': digest,
|
||||
'Signature': make_signature(sender, destination, now, digest),
|
||||
'Content-Type': 'application/activity+json; charset=utf-8',
|
||||
'User-Agent': settings.USER_AGENT,
|
||||
},
|
||||
)
|
||||
if not response.ok:
|
||||
|
Reference in New Issue
Block a user