CLOUDNS: Fix creation of intra-zone NS records (see #1263) (#1469)

This commit is contained in:
Pascal Mathis 2022-03-31 20:38:42 +02:00 committed by GitHub
parent 4a185909a8
commit 144adfd632
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -138,6 +138,12 @@ func (c *cloudnsProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mode
return nil, err
}
// ClouDNS does not require the trailing period to be specified when creating 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{
Msg: m.String(),
F: func() error {