From b91cf9fc508a6358ff47a49c11d3cce36bda5432 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Fri, 14 Apr 2023 12:17:08 +0200 Subject: add healthcheck --- app.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app.py') diff --git a/app.py b/app.py index e8e7c6c..cb1cf9d 100644 --- a/app.py +++ b/app.py @@ -15,6 +15,10 @@ AUTH_TOKEN = os.environ.get('AUTH_TOKEN', 'myuploadtoken') def is_valid_filename(filename): return bool(re.match(VALID_FILENAME_REGEX, filename)) +@app.route('/health', methods=['GET']) +def health_check(): + return 'OK' + @app.route('/upload', methods=['POST']) def upload_file(): if 'file' not in request.files: -- cgit v1.2.3