diff --git a/main.py b/main.py index 0f292ed..5ec5337 100644 --- a/main.py +++ b/main.py @@ -20,6 +20,13 @@ def get_client(request: aiohttp.web.Request): return client +@routes.get(CLIENT_REGEX) +async def handler(request: aiohttp.web.Request): + # this handler prevents people missing trailing slashes + client = get_client(request) + raise aiohttp.web.HTTPFound(f"/{client}/") + + @routes.get(CLIENT_REGEX + '/') async def handler(request: aiohttp.web.Request): client = get_client(request)