mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 08:16:51 -04:00
remove header banner when site is down
This commit is contained in:
@@ -118,6 +118,8 @@ from notifications_utils.formatters import (
|
||||
from notifications_utils.recipients import format_phone_number_human_readable
|
||||
from notifications_utils.url_safe_token import generate_token
|
||||
|
||||
from app.utils.api_health import is_api_down
|
||||
|
||||
login_manager = LoginManager()
|
||||
csrf = CSRFProtect()
|
||||
talisman = Talisman()
|
||||
@@ -185,6 +187,10 @@ def create_app(application):
|
||||
# FEATURE_ABOUT_PAGE_ENABLED=feature_about_page_enabled,
|
||||
# )
|
||||
|
||||
@application.context_processor
|
||||
def inject_is_api_down():
|
||||
return {"is_api_down": is_api_down()}
|
||||
|
||||
@application.context_processor
|
||||
def inject_initial_signin_url():
|
||||
ttl = 24 * 60 * 60
|
||||
|
||||
Reference in New Issue
Block a user