At the moment, the documentation only suggests exposing the health check by adding a path in urls.py. One issue we have encountered is that the health check endpoint can sometimes become unreachable due to other middleware in the Django stack. For example, middleware that enforces authentication, redirects, rate limiting, maintenance modes, IP filtering, or other request-processing logic may inadvertently block access to the health check endpoint.
In production environments, this can be problematic because health check endpoints are often used by load balancers, container orchestrators, or monitoring systems. These systems typically expect the endpoint to be reliably accessible regardless of most application-level behavior.
Because of this, it might be helpful if django-health-check provided one of the following:
- A built-in middleware that ensures the health check endpoint can bypass certain middleware behaviors (or is handled early in the request lifecycle),
- Documentation explaining how to implement such middleware safely.
At the moment, the documentation only suggests exposing the health check by adding a path in
urls.py. One issue we have encountered is that the health check endpoint can sometimes become unreachable due to other middleware in the Django stack. For example, middleware that enforces authentication, redirects, rate limiting, maintenance modes, IP filtering, or other request-processing logic may inadvertently block access to the health check endpoint.In production environments, this can be problematic because health check endpoints are often used by load balancers, container orchestrators, or monitoring systems. These systems typically expect the endpoint to be reliably accessible regardless of most application-level behavior.
Because of this, it might be helpful if
django-health-checkprovided one of the following: