restore prior cloudflare auto-ttl behavior when ttl is 300

This commit is contained in:
Craig Peterson 2019-06-17 15:09:27 -04:00
parent 539820f87a
commit f61efd45f2
No known key found for this signature in database
GPG key ID: 1FB135D7CFCDDE89

View file

@ -297,7 +297,7 @@ func (c *CloudflareApi) preprocessConfig(dc *models.DomainConfig) error {
if rec.Metadata == nil {
rec.Metadata = map[string]string{}
}
if rec.TTL == 0 { // Please read: https://github.com/StackExchange/dnscontrol/issues/490
if rec.TTL == 0 || rec.TTL == 300{
rec.TTL = 1
}
if rec.TTL != 1 && rec.TTL < 120 {