From 8cdfab1c7c45b1363dcbfa8e703aa48e5463fde7 Mon Sep 17 00:00:00 2001 From: dkeightley Date: Mon, 3 Jul 2017 15:53:26 +1200 Subject: [PATCH] Added NS record for forward and reverse domains --- app/views.py | 2 +- config_template.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/views.py b/app/views.py index 8cc8761..276d99a 100644 --- a/app/views.py +++ b/app/views.py @@ -321,7 +321,7 @@ def domain(domain_name): if not re.search('ip6\.arpa|in-addr\.arpa$', domain_name): editable_records = app.config['RECORDS_ALLOW_EDIT'] else: - editable_records = ['PTR'] + editable_records = app.config['REVERSE_ALLOW_EDIT'] return render_template('domain.html', domain=domain, records=records, editable_records=editable_records) else: return redirect(url_for('error', code=404)) diff --git a/config_template.py b/config_template.py index 288ff47..f863486 100644 --- a/config_template.py +++ b/config_template.py @@ -75,7 +75,10 @@ PDNS_API_KEY = 'you never know' PDNS_VERSION = '3.4.7' # RECORDS ALLOWED TO EDIT -RECORDS_ALLOW_EDIT = ['A', 'AAAA', 'CNAME', 'SPF', 'PTR', 'MX', 'TXT'] +RECORDS_ALLOW_EDIT = ['A', 'AAAA', 'CNAME', 'SPF', 'PTR', 'MX', 'TXT', 'NS'] + +# RECORDS ALLOWED TO EDIT FOR REVERSE DOMAINS +REVERSE_ALLOW_EDIT = ['PTR', 'NS'] # EXPERIMENTAL FEATURES PRETTY_IPV6_PTR = False