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)