mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 16:19:16 +02:00
We now use a proper user agent including instance version and url during outgoing requests
This commit is contained in:
parent
99200ad077
commit
b5ff339efa
10 changed files with 47 additions and 19 deletions
|
@ -1,5 +1,4 @@
|
|||
import logging
|
||||
import requests
|
||||
import uuid
|
||||
import xml
|
||||
|
||||
|
@ -12,6 +11,8 @@ from rest_framework.exceptions import PermissionDenied
|
|||
|
||||
from dynamic_preferences.registries import global_preferences_registry
|
||||
|
||||
from funkwhale_api.common import session
|
||||
|
||||
from . import activity
|
||||
from . import keys
|
||||
from . import models
|
||||
|
@ -28,7 +29,7 @@ def remove_tags(text):
|
|||
|
||||
|
||||
def get_actor_data(actor_url):
|
||||
response = requests.get(
|
||||
response = session.get_session().get(
|
||||
actor_url,
|
||||
headers={
|
||||
'Accept': 'application/activity+json',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue