From 85ae8f490cc04254ce6ecc6e9d989991291e1539 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Wed, 30 Aug 2023 15:38:09 -0400 Subject: check config after loading config --- newspipe/bootstrap.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/newspipe/bootstrap.py b/newspipe/bootstrap.py index 3905cd93..ac8147c7 100644 --- a/newspipe/bootstrap.py +++ b/newspipe/bootstrap.py @@ -56,8 +56,6 @@ class ReverseProxied(object): # Create Flask application application = Flask(__name__, instance_relative_config=True) -if "PREFIX" in application.config: - application.wsgi_app = ReverseProxied(application.wsgi_app, script_name=application.config["PREFIX"]) configuration = os.environ.get("NEWSPIPE_CONFIG", False) if configuration == "testing": application.debug = logging.DEBUG @@ -74,6 +72,9 @@ else: set_logging(application.config["LOG_PATH"]) +if "PREFIX" in application.config: + application.wsgi_app = ReverseProxied(application.wsgi_app, script_name=application.config["PREFIX"]) + db = SQLAlchemy(application) migrate = Migrate(application, db) -- cgit