Spaces:
Paused
Paused
dushyantsingh0 commited on
Commit ·
1282961
1
Parent(s): ba85b64
fix(prod): resolve persistent 404 with proxy-aware diagnostics
Browse files123428 unmodified lines333435363738from fastapi import FastAPIfrom fastapi.middleware.cors import CORSMiddlewarefrom core.config import get_settingsfrom core.database import engine, run_migrations28 unmodified linesredoc_url="/redoc",)# CORSapp.add_middleware(CORSMiddleware,1234528 unmodified lines34353637383940414243444546474849505152535455from fastapi import FastAPI, Requestfrom fastapi.responses import JSONResponsefrom fastapi.middleware.cors import CORSMiddlewarefrom core.config import get_settingsfrom core.database import engine, run_migrations28 unmodified linesredoc_url="/redoc",)@app.exception_handler(404)async def custom_404_handler(request: Request, __):return JSONResponse(status_code=404,content={"detail": "Nexus Route Not Found", "path": str(request.url.path)})@app.get("/", tags=["System"])def read_root():return {"status": "online","message": "Nexus AI Master Gateway is Live","version": settings.APP_VERSION,"docs": "/docs"}# CORSapp.add_middleware(CORSMiddleware,
main.py+18-1