diff options
author | B. Stack <bgstack15@gmail.com> | 2023-08-31 08:56:05 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2023-08-31 08:56:05 -0400 |
commit | 77e0ee3d09f88b1e264768fd7e4e2c6fd035b795 (patch) | |
tree | b23ff89469c03648877ee3772ec9e55924421390 | |
parent | modify only app.wsgi_app (diff) | |
download | newspipe-77e0ee3d09f88b1e264768fd7e4e2c6fd035b795.tar.gz newspipe-77e0ee3d09f88b1e264768fd7e4e2c6fd035b795.tar.bz2 newspipe-77e0ee3d09f88b1e264768fd7e4e2c6fd035b795.zip |
try top-level of NotFound()combine-apps
-rw-r--r-- | newspipe/bootstrap.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/newspipe/bootstrap.py b/newspipe/bootstrap.py index 0409906a..a6581c08 100644 --- a/newspipe/bootstrap.py +++ b/newspipe/bootstrap.py @@ -4,6 +4,7 @@ import logging import os from werkzeug.middleware.dispatcher import DispatcherMiddleware +from werkzeug.exceptions import NotFound from flask import Flask from flask import request from flask_babel import Babel @@ -76,7 +77,7 @@ if "PREFIX" in application.config: #application.wsgi_app = ReverseProxied(application.wsgi_app, script_name=application.config["PREFIX"]) #_app = application #application = DispatcherMiddleware(None,{str(application.config["PREFIX"]):_app}) - application.wsgi_app = DispatcherMiddleware(None,{str(application.config["PREFIX"]):application.wsgi_app}) + application.wsgi_app = DispatcherMiddleware(NotFound(),{str(application.config["PREFIX"]):application.wsgi_app}) db = SQLAlchemy(application) |