diff --git a/maubot/__meta__.py b/maubot/__meta__.py index 4ae7d5c..c40e5e8 100644 --- a/maubot/__meta__.py +++ b/maubot/__meta__.py @@ -1 +1 @@ -__version__ = "0.1.0.dev11" +__version__ = "0.1.0.dev13" diff --git a/maubot/management/api/middleware.py b/maubot/management/api/middleware.py index f5bd1e4..5f7a788 100644 --- a/maubot/management/api/middleware.py +++ b/maubot/management/api/middleware.py @@ -28,8 +28,8 @@ log = logging.getLogger("maubot.server") @web.middleware async def auth(request: web.Request, handler: Handler) -> web.Response: - subpath = request.path.lstrip(get_config()["server.base_path"]) - if subpath.startswith("auth/") or subpath == "logs": + subpath = request.path[len(get_config()["server.base_path"]):] + if subpath.startswith("/auth/") or subpath == "/logs": return await handler(request) err = check_token(request) if err is not None: