mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 12:49:24 +01:00
Fediverse: Use default headers
Some instances behind Cloudflare block requests without a User-Agent header.
This commit is contained in:
parent
3f5a18e8d0
commit
922b00c8c3
@ -229,7 +229,9 @@ def get_public_key_pem():
|
||||
def signed_request(url, headers=None, data=None):
|
||||
method = "get" if data is None else "post"
|
||||
instance_actor_url = get_instance_actor_url()
|
||||
headers = gen.InsensitivePreservingDict(headers or {})
|
||||
headers = gen.InsensitivePreservingDict(
|
||||
{**web.defaultHeaders, **(headers or {})}
|
||||
)
|
||||
|
||||
if "Date" not in headers:
|
||||
headers["Date"] = email.utils.formatdate(usegmt=True)
|
||||
|
Loading…
Reference in New Issue
Block a user