fix hostsub to work with ports

master
cynic 3 years ago
parent 91883d7577
commit 89a9e56766
  1. 2
      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):

Loading…
Cancel
Save