mik-laj commented on a change in pull request #9030:
URL: https://github.com/apache/airflow/pull/9030#discussion_r431991963
##########
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:
We don't use it in tests - test_views. This is still needed in
production for some users.
----------------------------------------------------------------
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:
[email protected]