mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
The TTL values permitted may be different for each account and for each domain. Therefore we perform this query once per domain. * Fetch ClouDNS allowed TTL values from API (Fix #1078) * Add get available TTL values comment
This commit is contained in:
@@ -94,8 +94,10 @@ func (c *cloudnsProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mode
|
||||
// Normalize
|
||||
models.PostProcessRecords(existingRecords)
|
||||
|
||||
// ClouDNS doesn't allow selecting an arbitrary TTL, only a set of predefined values https://asia.cloudns.net/wiki/article/188/
|
||||
// We need to make sure we don't change it every time if it is as close as it's going to get
|
||||
// Get a list of available TTL values.
|
||||
// The TTL list needs to be obtained for each domain, so get it first here.
|
||||
c.fetchAvailableTTLValues(dc.Name)
|
||||
// ClouDNS can only be specified from a specific TTL list, so change the TTL in advance.
|
||||
for _, record := range dc.Records {
|
||||
record.TTL = fixTTL(record.TTL)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user