BasPH commented on a change in pull request #14641:
URL: https://github.com/apache/airflow/pull/14641#discussion_r590712319
##########
File path: airflow/www/views.py
##########
@@ -2653,42 +2653,39 @@ class ConfigurationView(AirflowBaseView):
)
def conf(self):
"""Shows configuration."""
- raw = request.args.get('raw') == "true"
title = "Airflow Configuration"
- subtitle = AIRFLOW_CONFIG
- # Don't show config when expose_config variable is False in airflow
config
+
if conf.getboolean("webserver", "expose_config"):
- with open(AIRFLOW_CONFIG) as file:
- config = file.read()
table = [
(section, key, value, source)
for section, parameters in conf.as_dict(True, True).items()
for key, (value, source) in parameters.items()
]
- else:
- config = (
- "# Your Airflow administrator chose not to expose the "
- "configuration, most likely for security reasons."
+
+ if request.args.get('raw') == "true":
+ return Response(response=json.dumps(table), status=200,
mimetype="application/json")
Review comment:
Went ahead and removed `raw=true`
----------------------------------------------------------------
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]