Skip to content

Commit

Permalink
Fix Cloudflare AAAA creation (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
m4rcs authored Jul 23, 2024
1 parent fb542ae commit 1762813
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion internal/provider/cloudflare/cloudflare_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,16 @@ func (provider *DNSProvider) getDNSRecords(zoneID string) []DNSRecord {
}

func (provider *DNSProvider) createRecord(zoneID, domain, subDomain, ip string) error {
var recordType string

if provider.configuration.IPType == "" || strings.ToUpper(provider.configuration.IPType) == utils.IPV4 {
recordType = utils.IPTypeA
} else if strings.ToUpper(provider.configuration.IPType) == utils.IPV6 {
recordType = utils.IPTypeAAAA
}

newRecord := DNSRecord{
Type: utils.IPTypeA,
Type: recordType,
IP: ip,
TTL: 1,
}
Expand Down

0 comments on commit 1762813

Please sign in to comment.