healthcheck w docker-compose

This commit is contained in:
Mateusz Gruszczyński
2025-07-12 23:25:42 +02:00
parent 94eceb76ab
commit 2c6887095d

4
app.py
View File

@@ -272,7 +272,7 @@ def require_system_password():
if endpoint is None:
return
if endpoint == 'system_auth':
if endpoint in ('system_auth', 'healthcheck'):
return
if 'authorized' not in request.cookies and not endpoint.startswith('login') and endpoint != 'favicon':
@@ -1208,7 +1208,7 @@ def healthcheck():
correct_token = app.config.get('HEALTHCHECK_TOKEN')
if header_token != correct_token:
abort(403)
abort(404)
return 'OK', 200
# =========================================================================================