mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-06-17 23:09:35 +00:00
fix(health): add root /health for Railway healthcheck
Railway checks /health but all API routes are under /api/v1/.
This adds a lightweight root /health endpoint that returns
{"status": "ok"} — no auth, no DB, no middleware blocking.
This fixes the "1/1 replicas never became healthy" Railway error.
https://claude.ai/code/session_01W1rJthWDkasijTdXCfxVHs
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
f75e7c331e
commit
35962de933
@ -115,6 +115,13 @@ app.add_middleware(
|
|||||||
allow_headers=["*"],
|
allow_headers=["*"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@app.get("/health")
|
||||||
|
async def root_health():
|
||||||
|
"""Root-level health check for Railway/load balancer healthchecks."""
|
||||||
|
return {"status": "ok"}
|
||||||
|
|
||||||
|
|
||||||
# API Routes
|
# API Routes
|
||||||
app.include_router(api_router, prefix="/api/v1")
|
app.include_router(api_router, prefix="/api/v1")
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user