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 2020/12/02 15:15:06 UTC
[airflow] branch v1-10-test updated: fixup! [AIRFLOW-2886] Generate
random Flask SECRET_KEY in default config (#3738)
This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v1-10-test by this push:
new 653104a fixup! [AIRFLOW-2886] Generate random Flask SECRET_KEY in default config (#3738)
653104a is described below
commit 653104aee85136178a7c7a0e5841b17fd0ebd4d3
Author: Kaxil Naik <ka...@gmail.com>
AuthorDate: Wed Dec 2 15:14:06 2020 +0000
fixup! [AIRFLOW-2886] Generate random Flask SECRET_KEY in default config (#3738)
---
airflow/www/app.py | 3 +--
airflow/www_rbac/app.py | 1 -
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/airflow/www/app.py b/airflow/www/app.py
index f746fdc..ccf7939 100644
--- a/airflow/www/app.py
+++ b/airflow/www/app.py
@@ -61,12 +61,11 @@ def create_app(config=None, testing=False):
x_port=conf.getint("webserver", "PROXY_FIX_X_PORT", fallback=1),
x_prefix=conf.getint("webserver", "PROXY_FIX_X_PREFIX", fallback=1)
)
- app.secret_key = conf.get('webserver', 'SECRET_KEY')
app.config['PERMANENT_SESSION_LIFETIME'] = datetime.timedelta(minutes=settings.get_session_lifetime_config())
app.config['LOGIN_DISABLED'] = not conf.getboolean(
'webserver', 'AUTHENTICATE')
- app.secret_key = configuration.conf.get('webserver', 'SECRET_KEY')
+ app.secret_key = conf.get('webserver', 'SECRET_KEY')
app.config['SESSION_COOKIE_HTTPONLY'] = True
app.config['SESSION_COOKIE_SECURE'] = conf.getboolean('webserver', 'COOKIE_SECURE')
diff --git a/airflow/www_rbac/app.py b/airflow/www_rbac/app.py
index 1eaa623..d4a4f03 100644
--- a/airflow/www_rbac/app.py
+++ b/airflow/www_rbac/app.py
@@ -61,7 +61,6 @@ def create_app(config=None, session=None, testing=False, app_name="Airflow"):
x_port=conf.getint("webserver", "PROXY_FIX_X_PORT", fallback=1),
x_prefix=conf.getint("webserver", "PROXY_FIX_X_PREFIX", fallback=1)
)
- app.secret_key = conf.get('webserver', 'SECRET_KEY')
app.config['PERMANENT_SESSION_LIFETIME'] = timedelta(minutes=settings.get_session_lifetime_config())
app.secret_key = conf.get('webserver', 'SECRET_KEY')