diff --git a/api/src/redirector.py b/api/src/redirector.py index 1f81f54..66beee2 100644 --- a/api/src/redirector.py +++ b/api/src/redirector.py @@ -36,7 +36,12 @@ async def _handle_request(path: str): domains = Environment.get("DOMAINS", list[str], []) domain = await short_url.domain - if domain is not None and domain.name not in domains: + logger.debug(f"Domain: {domain}, request.host: {request.host}") + + 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: return render_template("404.html"), 404 user_agent = request.headers.get("User-Agent", "").lower() diff --git a/version.txt b/version.txt index cb174d5..d2d61a7 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.2.1 \ No newline at end of file +1.2.2 \ No newline at end of file