You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2025/04/07 22:00:53 UTC
(airflow) branch main updated: Apply configuration defined in `webserver_config.py` to Flask config (#48898)
This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 3039600b8e3 Apply configuration defined in `webserver_config.py` to Flask config (#48898)
3039600b8e3 is described below
commit 3039600b8e3f9c19dd9be0f355c0667a82175a4d
Author: Vincent <97...@users.noreply.github.com>
AuthorDate: Mon Apr 7 18:00:47 2025 -0400
Apply configuration defined in `webserver_config.py` to Flask config (#48898)
---
providers/fab/src/airflow/providers/fab/www/app.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/providers/fab/src/airflow/providers/fab/www/app.py b/providers/fab/src/airflow/providers/fab/www/app.py
index f96451a6275..3803adbde8d 100644
--- a/providers/fab/src/airflow/providers/fab/www/app.py
+++ b/providers/fab/src/airflow/providers/fab/www/app.py
@@ -56,6 +56,10 @@ def create_app(enable_plugins: bool):
flask_app.secret_key = conf.get("webserver", "SECRET_KEY")
flask_app.config["SQLALCHEMY_DATABASE_URI"] = conf.get("database", "SQL_ALCHEMY_CONN")
flask_app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
+ webserver_config = conf.get_mandatory_value("webserver", "config_file")
+ # Enable customizations in webserver_config.py to be applied via Flask.current_app.
+ with flask_app.app_context():
+ flask_app.config.from_pyfile(webserver_config, silent=True)
url = make_url(flask_app.config["SQLALCHEMY_DATABASE_URI"])
if url.drivername == "sqlite" and url.database and not isabs(url.database):