aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2023-08-30 15:38:09 -0400
committerB. Stack <bgstack15@gmail.com>2023-08-30 15:38:09 -0400
commit85ae8f490cc04254ce6ecc6e9d989991291e1539 (patch)
treec4dcea7e67c71f7d36728a8b3a6ea1264c35499f
parentadd support for reverse-proxy in config (diff)
downloadnewspipe-85ae8f490cc04254ce6ecc6e9d989991291e1539.tar.gz
newspipe-85ae8f490cc04254ce6ecc6e9d989991291e1539.tar.bz2
newspipe-85ae8f490cc04254ce6ecc6e9d989991291e1539.zip
check config after loading config
-rw-r--r--newspipe/bootstrap.py5
1 files 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)
bgstack15