From a3ef868924f1da5455b5e760a565add87e1f5f5d Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Tue, 10 Sep 2024 08:46:31 -0700 Subject: [PATCH] cleanup --- app/config.py | 10 +++++----- app/main/views/sign_in.py | 2 -- notifications_utils/logging.py | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/app/config.py b/app/config.py index fecbfdb65..dece2728d 100644 --- a/app/config.py +++ b/app/config.py @@ -163,11 +163,11 @@ class E2ETest(Staging): # Borrowed from development environment DEBUG = True - # SESSION_COOKIE_SECURE = False - # SESSION_PROTECTION = None - # HTTP_PROTOCOL = "http" - # ASSET_DOMAIN = "" - # ASSET_PATH = "/static/" + SESSION_COOKIE_SECURE = False + SESSION_PROTECTION = None + HTTP_PROTOCOL = "http" + ASSET_DOMAIN = "" + ASSET_PATH = "/static/" # Borrowed from test environment TESTING = True diff --git a/app/main/views/sign_in.py b/app/main/views/sign_in.py index 21d1efa03..cd91bbfc1 100644 --- a/app/main/views/sign_in.py +++ b/app/main/views/sign_in.py @@ -158,8 +158,6 @@ def _handle_e2e_tests(redirect_url): # Trying to get a message back to playwright somehow since we can't see the admin logs return redirect(url_for(f"https://{stre}")) - # return redirect(url_for("main.show_accounts_or_dashboard", next=redirect_url)) - @main.route("/sign-in", methods=(["GET", "POST"])) @hide_from_search_engines diff --git a/notifications_utils/logging.py b/notifications_utils/logging.py index d0c594c7e..4abe5bcf7 100644 --- a/notifications_utils/logging.py +++ b/notifications_utils/logging.py @@ -6,6 +6,7 @@ from itertools import product from flask import g, request from flask.ctx import has_app_context, has_request_context +from flask.logging import default_handler from pythonjsonlogger.jsonlogger import JsonFormatter as BaseJSONFormatter LOG_FORMAT = ( @@ -21,8 +22,7 @@ def init_app(app): app.config.setdefault("NOTIFY_LOG_LEVEL", "INFO") app.config.setdefault("NOTIFY_APP_NAME", "none") - # Try adding back default handler - # app.logger.removeHandler(default_handler) + app.logger.removeHandler(default_handler) handlers = get_handlers(app) loglevel = logging.getLevelName(app.config["NOTIFY_LOG_LEVEL"])