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

add a comment explaining cloudflare tll oddness

This commit is contained in:
Craig Peterson
2019-06-17 15:12:23 -04:00
parent f61efd45f2
commit 4a7a5515a0

View File

@@ -297,6 +297,9 @@ func (c *CloudflareApi) preprocessConfig(dc *models.DomainConfig) error {
if rec.Metadata == nil {
rec.Metadata = map[string]string{}
}
// cloudflare uses "1" to mean "auto-ttl"
// if we get here and ttl is not specified (or is the dnscontrol default of 300),
// use automatic mode instead.
if rec.TTL == 0 || rec.TTL == 300{
rec.TTL = 1
}