mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2025-06-05 21:59:23 +02:00
More thorough URL checks
This commit is contained in:
@ -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},
|
||||
|
Reference in New Issue
Block a user