mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-02-25 16:13:04 +08:00
parent
6d6f685f70
commit
d782bb002b
2 changed files with 10 additions and 0 deletions
|
@ -6,6 +6,10 @@ jsId: CLOUDFLAREAPI
|
|||
---
|
||||
# Cloudflare Provider
|
||||
|
||||
## Important notes
|
||||
|
||||
* When using `SPF()` or the `SPF_BUILDER()` the records are converted to RecordType `TXT` as Cloudflare API fails otherwise. See more [here](https://github.com/StackExchange/dnscontrol/issues/446).
|
||||
|
||||
## Configuration
|
||||
In the credentials file you must provide your Cloudflare API username and access token:
|
||||
|
||||
|
|
|
@ -393,6 +393,12 @@ func (c *cfRecord) nativeToRecord(domain string) *models.RecordConfig {
|
|||
Original: c,
|
||||
}
|
||||
rc.SetLabelFromFQDN(c.Name, domain)
|
||||
|
||||
// workaround for https://github.com/StackExchange/dnscontrol/issues/446
|
||||
if c.Type == "SPF" {
|
||||
c.Type = "TXT"
|
||||
}
|
||||
|
||||
switch rType := c.Type; rType { // #rtype_variations
|
||||
case "MX":
|
||||
var priority uint16
|
||||
|
|
Loading…
Reference in a new issue