diff --git a/blockerbugs/controllers/main.py b/blockerbugs/controllers/main.py index 9872a55..acbb5b9 100644 --- a/blockerbugs/controllers/main.py +++ b/blockerbugs/controllers/main.py @@ -35,12 +35,14 @@ from blockerbugs.models.update import Update from blockerbugs.models.release import Release from blockerbugs.controllers.forms import BugProposeForm +HEALTH_CHECK_PATH = '/_health' + main = Blueprint('main', __name__) @app.before_request def before_request(): - if request.path == '/_health': + if request.path == HEALTH_CHECK_PATH: return g.milestones = Milestone.query.filter_by(active=True).order_by(Milestone.name).all() g.version = __version__ @@ -281,7 +283,7 @@ def index(): return display_current() -@main.route('/_health') +@main.route(HEALTH_CHECK_PATH) def get_health_check(): """Endpoint for OpenShift pod health checks (liveness and readiness probes).