1
0
Fork 0

Updates lego.

This commit is contained in:
Ludovic Fernandez 2019-01-25 10:24:04 +01:00 committed by Traefiker Bot
parent 8c53318dac
commit e5fb1ffeb7
17 changed files with 295 additions and 19 deletions

View file

@ -180,10 +180,12 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
// Find the challenge TXT record and remove it if found.
var found bool
for i, h := range records {
var newRecords []Record
for _, h := range records {
if h.Name == ch.key && h.Type == "TXT" {
records = append(records[:i], records[i+1:]...)
found = true
} else {
newRecords = append(newRecords, h)
}
}
@ -191,7 +193,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
return nil
}
err = d.setHosts(ch.sld, ch.tld, records)
err = d.setHosts(ch.sld, ch.tld, newRecords)
if err != nil {
return fmt.Errorf("namecheap: %v", err)
}