drobne
This commit is contained in:
1 parent
62e40d5aee
commit
6f85dbf91c
5 files changed
+30
-2
No files matched your search
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user