Skip to content

Commit

Permalink
caddytls: Fix resolvers option of acme issuer (Caddyfile)
Browse files Browse the repository at this point in the history
  • Loading branch information
mholt committed Sep 9, 2020
1 parent 00e6b77 commit 9859ab8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/caddytls/acmeissuer.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,16 +345,16 @@ func (iss *ACMEIssuer) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
iss.Challenges.DNS.ProviderRaw = caddyconfig.JSONModuleObject(dnsProvModuleInstance, "name", provName, nil)

case "resolvers":
if !d.NextArg() {
return d.ArgErr()
}
if iss.Challenges == nil {
iss.Challenges = new(ChallengesConfig)
}
if iss.Challenges.DNS == nil {
iss.Challenges.DNS = new(DNSChallengeConfig)
}
iss.Challenges.DNS.Resolvers = d.RemainingArgs()
if len(iss.Challenges.DNS.Resolvers) == 0 {
return d.ArgErr()
}

default:
return d.Errf("unrecognized ACME issuer property: %s", d.Val())
Expand Down

0 comments on commit 9859ab8

Please sign in to comment.