From 89a9e567665514c36943dfdbd34bb821ba77735b Mon Sep 17 00:00:00 2001 From: cynic Date: Wed, 2 Nov 2022 12:21:56 -0400 Subject: [PATCH] fix hostsub to work with ports --- cathedral.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cathedral.py b/cathedral.py index 35f6c2d..3349cb7 100644 --- a/cathedral.py +++ b/cathedral.py @@ -12,7 +12,7 @@ class cathedral(): async def handle_http(self, r): for t in self.towers: for h in t.hooks: - if compile(h.replace("$HOST", self.cfg.get("host"))).match(str(r.url)): + if compile(h.replace("$HOST", r.host.split(".")[-1])).match(str(r.url)): return web.Response(**t.run(self, r)) return web.Response(body=f"lol dongs {r.url}") async def start_http(self):