moved api into /api/ prefix; allowed /api/ usage without auth
This commit is contained in:
@@ -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
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user