Skip to content

Commit

Permalink
fix: precheck function.
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez authored Sep 23, 2020
1 parent f59bf16 commit ef08e8b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/provider/acme/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,15 +265,15 @@ func (p *Provider) getClient() (*lego.Client, error) {
err = client.Challenge.SetDNS01Provider(provider,
dns01.CondOption(len(p.DNSChallenge.Resolvers) > 0, dns01.AddRecursiveNameservers(p.DNSChallenge.Resolvers)),
dns01.WrapPreCheck(func(domain, fqdn, value string, check dns01.PreCheckFunc) (bool, error) {
if p.DNSChallenge.DisablePropagationCheck {
return true, nil
}

if p.DNSChallenge.DelayBeforeCheck > 0 {
logger.Debugf("Delaying %d rather than validating DNS propagation now.", p.DNSChallenge.DelayBeforeCheck)
time.Sleep(time.Duration(p.DNSChallenge.DelayBeforeCheck))
}

if p.DNSChallenge.DisablePropagationCheck {
return true, nil
}

return check(fqdn, value)
}),
)
Expand Down

0 comments on commit ef08e8b

Please sign in to comment.