More thorough URL checks

This commit is contained in:
Thomas Sileo 2022-07-15 20:50:27 +02:00
parent 0d3b41272f
commit c160b75851
6 changed files with 25 additions and 6 deletions

View file

@ -5,6 +5,7 @@ import httpx
from loguru import logger
from app import config
from app.utils.url import check_url
async def webfinger(
@ -32,6 +33,7 @@ async def webfinger(
for i, proto in enumerate(protos):
try:
url = f"{proto}://{host}/.well-known/webfinger"
check_url(url)
resp = await client.get(
url,
params={"resource": resource},