Add IndieAuth support

This commit is contained in:
Thomas Sileo 2022-07-10 11:04:28 +02:00
parent 10676b039a
commit c10a27cc08
14 changed files with 578 additions and 19 deletions

View file

@ -8,6 +8,18 @@ from loguru import logger
from app.config import DEBUG
def make_abs(url: str | None, parent: str) -> str | None:
if url is None:
return None
if url.startswith("http"):
return url
return (
urlparse(parent)._replace(path=url, params="", query="", fragment="").geturl()
)
class InvalidURLError(Exception):
pass