Compare commits

...

1 Commits

Author SHA1 Message Date
hainenber
c77c709b79 fix(backend): export API no longer returns stale resources
Signed-off-by: hainenber <dotronghai96@gmail.com>
2026-07-02 22:19:12 +07:00
6 changed files with 6 additions and 0 deletions

View File

@@ -884,6 +884,7 @@ class ChartRestApi(BaseSupersetModelRestApi):
mimetype="application/zip",
as_attachment=True,
download_name=filename,
max_age=0,
)
if token := sanitize_cookie_token(request.args.get("token")):
response.set_cookie(token, "done", max_age=600)

View File

@@ -1375,6 +1375,7 @@ class DashboardRestApi(
mimetype="application/zip",
as_attachment=True,
download_name=filename,
max_age=0,
)
if token := sanitize_cookie_token(request.args.get("token")):
response.set_cookie(token, "done", max_age=600)

View File

@@ -576,6 +576,7 @@ class DatasetRestApi(BaseSupersetModelRestApi):
mimetype="application/zip",
as_attachment=True,
download_name=filename,
max_age=0,
)
if token := sanitize_cookie_token(request.args.get("token")):
response.set_cookie(token, "done", max_age=600)

View File

@@ -89,6 +89,7 @@ class ImportExportRestApi(BaseSupersetApi):
mimetype="application/zip",
as_attachment=True,
download_name=filename,
max_age=0,
)
return response

View File

@@ -312,6 +312,7 @@ class SavedQueryRestApi(BaseSupersetModelRestApi):
mimetype="application/zip",
as_attachment=True,
download_name=filename,
max_age=0,
)
if token := sanitize_cookie_token(request.args.get("token")):
response.set_cookie(token, "done", max_age=600)

View File

@@ -489,6 +489,7 @@ class ThemeRestApi(BaseSupersetModelRestApi):
mimetype="application/zip",
as_attachment=True,
download_name=filename,
max_age=0,
)
if token := sanitize_cookie_token(request.args.get("token")):
response.set_cookie(token, "done", max_age=600)