fix: Fetch nodeinfo endpoint address from .well-known/nodeinfo when checking instance availability
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2561>
This commit is contained in:
parent
cc0d642215
commit
e78191c917
3 changed files with 15 additions and 3 deletions
|
|
@ -643,8 +643,7 @@ def check_all_remote_instance_availability():
|
|||
@celery.app.task(name="federation.check_single_remote_instance_availability")
|
||||
def check_single_remote_instance_availability(domain):
|
||||
try:
|
||||
response = requests.get(f"https://{domain.name}/api/v1/instance/nodeinfo/2.0/")
|
||||
nodeinfo = response.json()
|
||||
nodeinfo = fetch_nodeinfo(domain.name)
|
||||
except Exception as e:
|
||||
logger.info(
|
||||
f"Domain {domain.name} could not be reached because of the following error : {e}. \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue