1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

CLOUDFLARE: Support CAA rtype (#285)

* Add CAA support to cloudflare
This commit is contained in:
Tom Limoncelli
2017-12-20 10:25:23 -05:00
committed by GitHub
parent ed2b34d473
commit 611a597ae0
5 changed files with 95 additions and 14 deletions

View File

@@ -255,6 +255,11 @@ func toRecordConfig(dc *models.DomainConfig, r *vultr.DNSRecord) (*models.Record
if r.Type == "CAA" {
// Vultr returns in the format "[flag] [tag] [value]"
// TODO(tal): I copied this code into models/dns.go. At this point
// we can probably replace the code below with:
// rc.CaaFlag, rc.CaaTag, rc.Target, err := models.SplitCombinedCaaValue(rc.Target)
// return rc, err
splitData := strings.SplitN(rc.Target, " ", 3)
if len(splitData) != 3 {
return nil, fmt.Errorf("Unexpected data for CAA record returned by Vultr")