mirror of
https://github.com/aljazceru/CTFd.git
synced 2026-02-03 21:34:34 +01:00
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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user