mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-09 23:20:27 +00:00
Allow CNAMEs to point to '@'
If a CNAME records is specified to point to '@' or '', replace record data with the base domain name.
This commit is contained in:
parent
85e745731b
commit
3a5eaaeeb5
@ -1346,10 +1346,12 @@ class Record(object):
|
|||||||
if ':' in r['record_name']: # dirty ipv6 check
|
if ':' in r['record_name']: # dirty ipv6 check
|
||||||
r_name = r['record_name']
|
r_name = r['record_name']
|
||||||
|
|
||||||
|
r_data = domain if r_type == 'CNAME' and r['record_data'] in ['@', ''] else r['record_data']
|
||||||
|
|
||||||
record = {
|
record = {
|
||||||
"name": r_name,
|
"name": r_name,
|
||||||
"type": r_type,
|
"type": r_type,
|
||||||
"content": r['record_data'],
|
"content": r_data,
|
||||||
"disabled": True if r['record_status'] == 'Disabled' else False,
|
"disabled": True if r['record_status'] == 'Disabled' else False,
|
||||||
"ttl": int(r['record_ttl']) if r['record_ttl'] else 3600,
|
"ttl": int(r['record_ttl']) if r['record_ttl'] else 3600,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user