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

No files matched your search

+10
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()