mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
DIGITALOCEAN: Improve TXT record handling (#2128)
This commit is contained in:
@@ -277,12 +277,11 @@ func toRc(domain string, r *godo.DomainRecord) *models.RecordConfig {
|
||||
CaaFlag: uint8(r.Flags),
|
||||
}
|
||||
t.SetLabelFromFQDN(name, domain)
|
||||
t.SetTarget(target)
|
||||
switch rtype := r.Type; rtype {
|
||||
case "TXT":
|
||||
t.SetTargetTXTfromRFC1035Quoted(target)
|
||||
t.SetTargetTXT(target)
|
||||
default:
|
||||
// nothing additional required
|
||||
t.SetTarget(target)
|
||||
}
|
||||
return t
|
||||
}
|
||||
@@ -304,7 +303,7 @@ func toReq(dc *models.DomainConfig, rc *models.RecordConfig) *godo.DomainRecordE
|
||||
priority = int(rc.SrvPriority)
|
||||
case "TXT":
|
||||
// TXT records are the one place where DO combines many items into one field.
|
||||
target = rc.GetTargetField()
|
||||
target = rc.GetTargetTXTJoined()
|
||||
default:
|
||||
// no action required
|
||||
}
|
||||
|
Reference in New Issue
Block a user