diff --git a/cathedral.py b/cathedral.py index a3541b1..e142dbf 100644 --- a/cathedral.py +++ b/cathedral.py @@ -12,8 +12,7 @@ class cathedral(): async def handle_http(self, r): for t in self.towers: for h in t.hooks: - print(str(r.host)[str(r.host).find(self.cfg.get("host")):]) - if compile(h.replace("$HOST", str(r.host)[str(r.host).find(self.cfg.get("host")):])).match(str(r.url)): + if compile(h.replace("$HOST", str(r.host)[str(r.host).find(self.cfg.get("base")):])).match(str(r.url)): return web.Response(**t.run(self, r)) return web.Response(body=f"usergroup homepage") async def start_http(self): diff --git a/config.json b/config.json index 87ff5af..e2f8f1b 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,6 @@ { "host": "localhost", + "base": "f.q.d.n", "port": 1337, "PLUGIN_PATH": "./towers" -} \ No newline at end of file +} diff --git a/towers/fiefdom.py b/towers/fiefdom.py index 8f6f6b7..32a06da 100644 --- a/towers/fiefdom.py +++ b/towers/fiefdom.py @@ -9,7 +9,7 @@ def run(ctx, r): if not(user in ctx.auth.get_real_users()): return { - "body": f"