Allow access to /features endpoint without login

This commit is contained in:
Tulir Asokan 2019-01-07 08:13:27 +02:00
parent a9ffaed51f
commit 400c9aaebc
5 changed files with 15 additions and 8 deletions

View file

@ -29,7 +29,7 @@ log = logging.getLogger("maubot.server")
@web.middleware
async def auth(request: web.Request, handler: Handler) -> web.Response:
subpath = request.path[len(get_config()["server.base_path"]):]
if subpath.startswith("/auth/") or subpath == "/logs":
if subpath.startswith("/auth/") or subpath == "/features" or subpath == "/logs":
return await handler(request)
err = check_token(request)
if err is not None: