mik-laj commented on a change in pull request #9030: URL: https://github.com/apache/airflow/pull/9030#discussion_r431166489
########## File path: airflow/www/app.py ########## @@ -70,6 +73,31 @@ def create_app(config=None, testing=False, app_name="Airflow"): app.json_encoder = AirflowJsonEncoder csrf.init_app(app) + + def apply_middlewares(flask_app: Flask): + # Apply DispatcherMiddleware + base_url = urlparse(conf.get('webserver', 'base_url'))[2] + if not base_url or base_url == '/': + base_url = "" + if base_url: + flask_app.wsgi_app = DispatcherMiddleware( # type: ignore Review comment: This middleware is now optional. We use addresses in the form of `blocked` which do not work properly with this middleware. This middleware expects the addresses to be in the form `/blocked`. However, if we don't use this middleware, it doesn't matter. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org