mongo-express-docker
mongo-express-docker copied to clipboard
Feature Request: Unauthenticated health check
For certain deployments, e.g. Kubernetes with CGE Load Balancers, each pod is required to provide an unauthenticated health check route. This route ("/" by default, but I think it can be configured) should responds with status code 200 OK
when the service is running properly.
Currently, mongo-express
only supports this requirement if basic auth is disabled, which then leaves it completely unauthenticated.
I propose an additional parameter ME_CONFIG_HEALTH_CHECK_PATH
, which creates an unauthenticated route that simply returns 200 OK
when called. The fact that the route can be called should suffice as a health check, although more elaborate ones could also be implemented.
Ideally this route should work in combination with ME_CONFIG_SITE_BASEURL
, such that the following scenario would be possible:
-
ME_CONFIG_SITE_BASEURL = "/express"
-> The mongo-express UI is served on "/express" -
ME_CONFIG_HEALTH_CHECK_PATH = "/"
-> Health checks can be run on "/"
I realized, this primarily belongs to the mongo-express/mongo-express repo and opened an issue there as well.
Resolved with https://github.com/mongo-express/mongo-express/issues/849