1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-12 17:07:23 +01:00

Add download zonefile button to external DNS page (#1853)

Co-authored-by: Joshua Tauberer <jt@occams.info>
This commit is contained in:
Victor
2020-11-16 12:03:41 +01:00
committed by GitHub
parent 7fd35bbd11
commit b85b86e6de
5 changed files with 87 additions and 1 deletions

View File

@@ -1,3 +1,5 @@
#!/usr/local/lib/mailinabox/env/bin/python3
import os, os.path, re, json, time
import multiprocessing.pool, subprocess
@@ -338,6 +340,12 @@ def dns_get_dump():
from dns_update import build_recommended_dns
return json_response(build_recommended_dns(env))
@app.route('/dns/zonefile/<zone>')
@authorized_personnel_only
def dns_get_zonefile(zone):
from dns_update import get_dns_zonefile
return Response(get_dns_zonefile(zone, env), status=200, mimetype='text/plain')
# SSL
@app.route('/ssl/status')