Skip to content

Commit

Permalink
[AIRFLOW-5357] Fix Content-Type for exported variables.json file (#5963)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaxil authored Aug 30, 2019
1 parent d0498bd commit 3fbc519
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2658,6 +2658,7 @@ def action_varexport(self, ids, session=None):

response = make_response(json.dumps(var_dict, sort_keys=True, indent=4))
response.headers["Content-Disposition"] = "attachment; filename=variables.json"
response.headers["Content-Type"] = "application/json; charset=utf-8"
return response

def on_form_prefill(self, form, id):
Expand Down
1 change: 1 addition & 0 deletions airflow/www_rbac/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2249,6 +2249,7 @@ def action_varexport(self, items):

response = make_response(json.dumps(var_dict, sort_keys=True, indent=4))
response.headers["Content-Disposition"] = "attachment; filename=variables.json"
response.headers["Content-Type"] = "application/json; charset=utf-8"
return response

@expose('/varimport', methods=["POST"])
Expand Down

0 comments on commit 3fbc519

Please sign in to comment.