healthcheck w docker-compose
This commit is contained in:
4
app.py
4
app.py
@@ -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
|
||||
|
||||
# =========================================================================================
|
||||
|
Reference in New Issue
Block a user