Fix webfinger lookup

pull/14/head
Thomas Sileo 2018-07-31 22:19:51 +02:00
rodzic cf1d61dd3c
commit a6101a81e3
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -40,6 +40,7 @@ def webfinger(resource: str) -> Optional[Dict[str, Any]]: # noqa: C901
url = f"{proto}://{host}/.well-known/webfinger"
# FIXME(tsileo): BACKEND.fetch_json so we can set a UserAgent
resp = get_backend().fetch_json(url, params={"resource": resource})
break
except requests.ConnectionError:
logger.exception("req failed")
# If we tried https first and the domain is "http only"