mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-09-11 23:54:28 +08:00
Gandi does not support TTLs > 30 days (#139)
* Fix https://github.com/StackExchange/dnscontrol/issues/108 TODO(tlim): Add tests. * fixup!
This commit is contained in:
parent
f23e67daf7
commit
2b93e6725f
1 changed files with 4 additions and 0 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"github.com/StackExchange/dnscontrol/models"
|
||||
"github.com/StackExchange/dnscontrol/providers"
|
||||
"github.com/StackExchange/dnscontrol/providers/diff"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"strings"
|
||||
|
||||
|
@ -77,6 +78,9 @@ func (c *GandiApi) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Corr
|
|||
log.Printf("WARNING: Gandi does not support ttls < 300. %s will not be set to %d.", rec.NameFQDN, rec.TTL)
|
||||
rec.TTL = 300
|
||||
}
|
||||
if rec.TTL > 2592000 {
|
||||
return nil, errors.Errorf("ERROR: Gandi does not support TTLs > 30 days (TTL=%d)", rec.TTL)
|
||||
}
|
||||
if rec.Type == "TXT" {
|
||||
rec.Target = "\"" + rec.Target + "\"" // FIXME(tlim): Should do proper quoting.
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue