mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
CLOUDFLARE: sometime ago they bump down the min ttl to 60 second (#1988)
This commit is contained in:
@ -256,13 +256,13 @@ which as far as we can tell means 300 seconds (5 minutes) with the option that
|
||||
CloudFlare may dynamically adjust the actual TTL. In the Cloudflare API,
|
||||
setting the TTL to 300 results in the TTL being set to 1.
|
||||
|
||||
If the TTL isn't set to 1, Cloudflare has a minimum of 2 minutes.
|
||||
If the TTL isn't set to 1, Cloudflare has a minimum of 1 minutes.
|
||||
|
||||
A TTL of 0 tells DNSControl to use the default TTL for that provider, which is 1.
|
||||
|
||||
In summary:
|
||||
* TTL of 0, 1 and 300 are all the same ("auto TTL").
|
||||
* TTL of 2-120 are all the same as 120.
|
||||
* TTL of 121-299, and 301 to infinity are not magic.
|
||||
* TTL of 2-60 are all the same as 60.
|
||||
* TTL of 61-299, and 301 to infinity are not magic.
|
||||
|
||||
Some of this is documented on the Cloudflare website's [Time to Live (TTL)](https://developers.cloudflare.com/dns/manage-dns-records/reference/ttl/) page.
|
||||
|
@ -420,8 +420,8 @@ func (c *cloudflareProvider) preprocessConfig(dc *models.DomainConfig) error {
|
||||
if rec.TTL == 0 || rec.TTL == 300 {
|
||||
rec.TTL = 1
|
||||
}
|
||||
if rec.TTL != 1 && rec.TTL < 120 {
|
||||
rec.TTL = 120
|
||||
if rec.TTL != 1 && rec.TTL < 60 {
|
||||
rec.TTL = 60
|
||||
}
|
||||
|
||||
if rec.Type != "A" && rec.Type != "CNAME" && rec.Type != "AAAA" && rec.Type != "ALIAS" {
|
||||
|
Reference in New Issue
Block a user