From ebf5c615ed885b79740d307e189963f8f4884c70 Mon Sep 17 00:00:00 2001 From: edraft Date: Thu, 16 Jan 2025 17:11:28 +0100 Subject: [PATCH] Should fix redirector --- api/src/redirector.py | 2 +- version.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/redirector.py b/api/src/redirector.py index 66beee2..2a9498d 100644 --- a/api/src/redirector.py +++ b/api/src/redirector.py @@ -41,7 +41,7 @@ async def _handle_request(path: str): host = request.host if ":" in host: host = host.split(":")[0] - if host not in domains or domain is not None and domain.name not in domains: + if host not in domains or (domain is not None and not any(host.endswith(d) for d in domains)): return render_template("404.html"), 404 user_agent = request.headers.get("User-Agent", "").lower() diff --git a/version.txt b/version.txt index e2cac26..b966e81 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.2.3 \ No newline at end of file +1.2.4 \ No newline at end of file