From 150448367775a1131bd3340b5e5535be1bfbd6fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Thiede?= Date: Sun, 29 Oct 2023 11:50:36 +0100 Subject: [PATCH] make it save as a file, name {domain}-zonefile.txt --- core/admin/mailu/ui/views/domains.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/admin/mailu/ui/views/domains.py b/core/admin/mailu/ui/views/domains.py index 3dc0fcdb..b03b96b0 100644 --- a/core/admin/mailu/ui/views/domains.py +++ b/core/admin/mailu/ui/views/domains.py @@ -84,7 +84,7 @@ def domain_download_zonefile(domain_name): final = final + domain.dns_tlsa for i in domain.dns_autoconfig: final = final + i+"\n" - return flask.Response(final,content_type="text/plain") + return flask.Response(final,content_type="text/plain",headers={'Content-disposition': 'attachment; filename='+domain.name+'-zonefile.txt'}) @ui.route('/domain/genkeys/', methods=['GET', 'POST'])