Spaces:
Running
Running
th commited on
Commit ·
7143d5d
1
Parent(s): af9f0ec
Fix: Support HEAD method for /health endpoint
Browse files- Add @app .head('/health') decorator to support HEAD requests
- Fixes 405 Method Not Allowed error from UptimeRobot monitoring
- Some monitoring services use HEAD instead of GET for health checks
app.py
CHANGED
|
@@ -67,6 +67,7 @@ def root():
|
|
| 67 |
return {"status": "online", "service": "Sisi Astrology API"}
|
| 68 |
|
| 69 |
@app.get("/health")
|
|
|
|
| 70 |
def health_check():
|
| 71 |
"""Health check endpoint for monitoring services"""
|
| 72 |
return {
|
|
|
|
| 67 |
return {"status": "online", "service": "Sisi Astrology API"}
|
| 68 |
|
| 69 |
@app.get("/health")
|
| 70 |
+
@app.head("/health") # Support HEAD requests for monitoring services
|
| 71 |
def health_check():
|
| 72 |
"""Health check endpoint for monitoring services"""
|
| 73 |
return {
|