From 77e0ee3d09f88b1e264768fd7e4e2c6fd035b795 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Thu, 31 Aug 2023 08:56:05 -0400 Subject: try top-level of NotFound() --- newspipe/bootstrap.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit