mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-12-10 14:16:08 +08:00
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
parent
2e28dcd644
commit
48a8a95b4a
1 changed files with 7 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/miekg/dns/dnsutil"
|
"github.com/miekg/dns/dnsutil"
|
||||||
|
|
||||||
|
|
@ -160,6 +161,12 @@ func (c *cloudnsProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mode
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ClouDNS does not require the trailing period to be specified when updating an NS record where the A or AAAA record exists in the zone.
|
||||||
|
// So, modify it to remove the trailing period.
|
||||||
|
if req["record-type"] == "NS" && strings.HasSuffix(req["record"], domainID+".") {
|
||||||
|
req["record"] = strings.TrimSuffix(req["record"], ".")
|
||||||
|
}
|
||||||
|
|
||||||
corr := &models.Correction{
|
corr := &models.Correction{
|
||||||
Msg: fmt.Sprintf("%s, ClouDNS ID: %s: ", m.String(), id),
|
Msg: fmt.Sprintf("%s, ClouDNS ID: %s: ", m.String(), id),
|
||||||
F: func() error {
|
F: func() error {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue