A GET
endpoint in FastAPI is returning correct result, but returns 405 method not allowed
when curl -I
is used. This is happening with all the GET
endpoints. As a result, the application is working, but health check on application from a load balancer is failing.
Any suggestions what could be wrong?
code
@app.get('/health')async def health():""" Returns health status""" return JSONResponse({'status': 'ok'})
result
curl http://172.xx.xx.xx:8080
return header
curl -I http://172.xx.xx.xx:8080