|
|
@ -12,7 +12,7 @@ class cathedral(): |
|
|
|
async def handle_http(self, r): |
|
|
|
async def handle_http(self, r): |
|
|
|
for t in self.towers: |
|
|
|
for t in self.towers: |
|
|
|
for h in t.hooks: |
|
|
|
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(**t.run(self, r)) |
|
|
|
return web.Response(body=f"lol dongs {r.url}") |
|
|
|
return web.Response(body=f"lol dongs {r.url}") |
|
|
|
async def start_http(self): |
|
|
|
async def start_http(self): |
|
|
|