mirror of
https://github.com/go-acme/lego
synced 2026-03-14 14:35:48 +01:00
acme-dns: continue the process when the CNAME is handled by the storage (#2443)
This commit is contained in:
parent
c34138845e
commit
f9c1e241f3
1 changed files with 8 additions and 6 deletions
|
|
@ -172,14 +172,16 @@ func (d *DNSProvider) Present(domain, _, keyAuth string) error {
|
|||
// Check if credentials were previously saved for this domain.
|
||||
account, err := d.storage.Fetch(ctx, domain)
|
||||
if err != nil {
|
||||
if errors.Is(err, storage.ErrDomainNotFound) {
|
||||
// The account did not exist.
|
||||
// Create a new one and return an error indicating the required one-time manual CNAME setup.
|
||||
return d.register(ctx, domain, info.FQDN)
|
||||
if !errors.Is(err, storage.ErrDomainNotFound) {
|
||||
return err
|
||||
}
|
||||
|
||||
// Errors other than goacmedns.ErrDomainNotFound are unexpected.
|
||||
return err
|
||||
// The account did not exist.
|
||||
// Create a new one and return an error indicating the required one-time manual CNAME setup.
|
||||
err = d.register(ctx, domain, info.FQDN)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// Update the acme-dns TXT record.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue