DEBUG observability: router properly mounted before root() handler
This commit is contained in:
@@ -1796,6 +1796,15 @@ _UPLOAD_DIR.mkdir(parents=True, exist_ok=True)
|
||||
(_UPLOAD_DIR / "avatars").mkdir(parents=True, exist_ok=True)
|
||||
app.mount("/uploads", StaticFiles(directory=str(_UPLOAD_DIR)), name="uploads")
|
||||
|
||||
# === DEBUG observability router (live dashboard) ===
|
||||
try:
|
||||
from routers.debug_router import router as debug_router
|
||||
app.include_router(debug_router)
|
||||
print('[DEBUG] observability router loaded (/api/debug/*)')
|
||||
except Exception as e:
|
||||
print(f'[DEBUG] router fail: {e}')
|
||||
|
||||
|
||||
@app.get("/")
|
||||
def root(request: Request):
|
||||
host = request.headers.get("host", "")
|
||||
|
||||
Reference in New Issue
Block a user