moved api into /api/ prefix; allowed /api/ usage without auth

This commit is contained in:
2026-05-24 12:02:22 +02:00
parent 0f0a261516
commit 6045f19736
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -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)
+1 -1
View File
@@ -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)