diff options
-rw-r--r-- | newspipe/bootstrap.py | 5 |
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) |