From 4bfac574dbca5ff8e9b332e7ef74b193584f110d Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Tue, 8 Dec 2020 10:00:36 -0500 Subject: [PATCH 1/2] Adding health route --- proxstar/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/proxstar/__init__.py b/proxstar/__init__.py index 05ff9bf..505a182 100644 --- a/proxstar/__init__.py +++ b/proxstar/__init__.py @@ -584,6 +584,14 @@ def logout(): return redirect(url_for('list_vms'), 302) +@app.route("/health") +def health(): + """ + Shows an ok status if the application is up and running + """ + return {"status": "ok"} + + def exit_handler(): stop_websockify() for tunnel in ssh_tunnels: From 094f33d61874ab48a906735cd3c754b978dec5c9 Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Tue, 8 Dec 2020 10:03:28 -0500 Subject: [PATCH 2/2] Fixing quotes --- proxstar/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxstar/__init__.py b/proxstar/__init__.py index 505a182..f814a39 100644 --- a/proxstar/__init__.py +++ b/proxstar/__init__.py @@ -584,12 +584,12 @@ def logout(): return redirect(url_for('list_vms'), 302) -@app.route("/health") +@app.route('/health') def health(): """ Shows an ok status if the application is up and running """ - return {"status": "ok"} + return {'status': 'ok'} def exit_handler():