This commit is contained in:
Mateusz Gruszczyński
2025-08-28 13:56:00 +02:00
parent 62e40d5aee
commit 6f85dbf91c
5 changed files with 30 additions and 2 deletions

10
app.py
View File

@@ -595,6 +595,16 @@ def favicon():
return "", 204
@app.route("/healthcheck")
def healthcheck():
header_token = request.headers.get("X-Internal-Check")
correct_token = app.config.get("HEALTHCHECK_TOKEN")
if header_token != correct_token:
abort(404)
return "OK", 200
if __name__ == "__main__":
with app.app_context():
db.create_all()