Prevent browser from caching the export (#1033)

* Add `cache_timeout` parameter to `send_file`response in `/admin/export` to prevent the browser from caching the export
* Closes #1032
This commit is contained in:
Kevin Chung
2019-06-22 13:36:45 -07:00
committed by GitHub
parent 447f71d41b
commit d8ca73ac18

View File

@@ -110,7 +110,9 @@ def export_ctf():
ctf_name = ctf_config.ctf_name()
day = datetime.datetime.now().strftime("%Y-%m-%d")
full_name = u"{}.{}.zip".format(ctf_name, day)
return send_file(backup, as_attachment=True, attachment_filename=full_name)
return send_file(
backup, cache_timeout=-1, as_attachment=True, attachment_filename=full_name
)
@admin.route("/admin/export/csv")