From 6045f19736db6bbb15769bfe52d9efa6043055e8 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Sun, 24 May 2026 12:02:22 +0200 Subject: [PATCH] moved api into /api/ prefix; allowed /api/ usage without auth --- stand/auth/mw.py | 1 + stand/main.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/stand/auth/mw.py b/stand/auth/mw.py index 5100e18..32512af 100644 --- a/stand/auth/mw.py +++ b/stand/auth/mw.py @@ -20,6 +20,7 @@ class AuthMiddleware(BaseHTTPMiddleware): app.storage.user.get("authenticated") or path in unrestricted_page_routes or path.startswith("/_nicegui") + or path.startswith("/api/") ): return await call_next(request) diff --git a/stand/main.py b/stand/main.py index c0e97e6..003664a 100755 --- a/stand/main.py +++ b/stand/main.py @@ -20,7 +20,7 @@ from table import router as table_router app.include_router(login_router) app.add_middleware(AuthMiddleware) -app.include_router(api_router) +app.include_router(api_router, prefix="/api") app.include_router(home_router) app.include_router(table_router)