Added NS record for forward and reverse domains

This commit is contained in:
dkeightley 2017-07-03 15:53:26 +12:00
parent b6ed658cbd
commit 8cdfab1c7c
2 changed files with 5 additions and 2 deletions

View File

@ -321,7 +321,7 @@ def domain(domain_name):
if not re.search('ip6\.arpa|in-addr\.arpa$', domain_name): if not re.search('ip6\.arpa|in-addr\.arpa$', domain_name):
editable_records = app.config['RECORDS_ALLOW_EDIT'] editable_records = app.config['RECORDS_ALLOW_EDIT']
else: else:
editable_records = ['PTR'] editable_records = app.config['REVERSE_ALLOW_EDIT']
return render_template('domain.html', domain=domain, records=records, editable_records=editable_records) return render_template('domain.html', domain=domain, records=records, editable_records=editable_records)
else: else:
return redirect(url_for('error', code=404)) return redirect(url_for('error', code=404))

View File

@ -75,7 +75,10 @@ PDNS_API_KEY = 'you never know'
PDNS_VERSION = '3.4.7' PDNS_VERSION = '3.4.7'
# RECORDS ALLOWED TO EDIT # 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 # EXPERIMENTAL FEATURES
PRETTY_IPV6_PTR = False PRETTY_IPV6_PTR = False