mongo-express / mongo-express-docker

a dockerized mongo-express for viewing mongoDB in the browser
MIT License
201 stars 93 forks source link

Feature Request: Unauthenticated health check #76

Closed masus04 closed 2 years ago

masus04 commented 2 years ago

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:

masus04 commented 2 years ago

I realized, this primarily belongs to the mongo-express/mongo-express repo and opened an issue there as well.

BlackthornYugen commented 2 years ago

Resolved with https://github.com/mongo-express/mongo-express/issues/849