mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-04 05:31:44 -04:00
Added status page
- returns "OK" as JSON with a 200 - used in healthchecks
This commit is contained in:
@@ -37,6 +37,9 @@ def create_app(config_name, config_overrides=None):
|
|||||||
from app.main import main as main_blueprint
|
from app.main import main as main_blueprint
|
||||||
application.register_blueprint(main_blueprint)
|
application.register_blueprint(main_blueprint)
|
||||||
|
|
||||||
|
from .status import status as status_blueprint
|
||||||
|
application.register_blueprint(status_blueprint)
|
||||||
|
|
||||||
proxy_fix.init_app(application)
|
proxy_fix.init_app(application)
|
||||||
|
|
||||||
application.session_interface = ItsdangerousSessionInterface()
|
application.session_interface = ItsdangerousSessionInterface()
|
||||||
|
|||||||
5
app/status/__init__.py
Normal file
5
app/status/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
from flask import Blueprint
|
||||||
|
|
||||||
|
status = Blueprint('status', __name__)
|
||||||
|
|
||||||
|
from app.status.views import healthcheck
|
||||||
0
app/status/views/__init__.py
Normal file
0
app/status/views/__init__.py
Normal file
10
app/status/views/healthcheck.py
Normal file
10
app/status/views/healthcheck.py
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
from flask import jsonify
|
||||||
|
|
||||||
|
from app.status import status
|
||||||
|
|
||||||
|
|
||||||
|
@status.route('/_status')
|
||||||
|
def status():
|
||||||
|
return jsonify(
|
||||||
|
status="ok",
|
||||||
|
), 200
|
||||||
Reference in New Issue
Block a user