Ryan Christian D. Deniega commited on
Commit
32ac1d9
·
1 Parent(s): cadb6ae

fix: add HEAD method to health endpoints for UptimeRobot

Browse files
Files changed (1) hide show
  1. main.py +3 -0
main.py CHANGED
@@ -117,8 +117,11 @@ async def root():
117
 
118
 
119
  # Cloud Run health check (no /api prefix so load balancer can reach it)
 
120
  @app.get("/health", tags=["Health"])
 
121
  @app.get("/api/health", tags=["Health"])
 
122
  async def health():
123
  return {"status": "ok", "env": settings.app_env}
124
 
 
117
 
118
 
119
  # Cloud Run health check (no /api prefix so load balancer can reach it)
120
+ # HEAD support for UptimeRobot and other uptime monitors
121
  @app.get("/health", tags=["Health"])
122
+ @app.head("/health", tags=["Health"])
123
  @app.get("/api/health", tags=["Health"])
124
+ @app.head("/api/health", tags=["Health"])
125
  async def health():
126
  return {"status": "ok", "env": settings.app_env}
127