Spaces:
Sleeping
Sleeping
Debug: print registered FastAPI routes at startup
Browse files- backend/app/main.py +11 -0
backend/app/main.py
CHANGED
|
@@ -215,6 +215,17 @@ async def startup_event():
|
|
| 215 |
|
| 216 |
# Launch universal warmup in background
|
| 217 |
asyncio.create_task(run_universal_warmup())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 218 |
robust_print("-" * 50, flush=True)
|
| 219 |
robust_print("FakeShield API is now ONLINE and listening on port 8001.", flush=True)
|
| 220 |
robust_print("-" * 50, flush=True)
|
|
|
|
| 215 |
|
| 216 |
# Launch universal warmup in background
|
| 217 |
asyncio.create_task(run_universal_warmup())
|
| 218 |
+
# DEBUG: print all registered routes for troubleshooting
|
| 219 |
+
try:
|
| 220 |
+
robust_print("[ROUTES] Registered FastAPI routes:")
|
| 221 |
+
for r in app.routes:
|
| 222 |
+
try:
|
| 223 |
+
methods = ",".join(sorted(list(r.methods))) if hasattr(r, 'methods') and r.methods else ''
|
| 224 |
+
except Exception:
|
| 225 |
+
methods = ''
|
| 226 |
+
robust_print(f"[ROUTE] path={getattr(r, 'path', str(r))} name={getattr(r, 'name', '')} methods={methods}")
|
| 227 |
+
except Exception:
|
| 228 |
+
pass
|
| 229 |
robust_print("-" * 50, flush=True)
|
| 230 |
robust_print("FakeShield API is now ONLINE and listening on port 8001.", flush=True)
|
| 231 |
robust_print("-" * 50, flush=True)
|