mirror of https://github.com/caddyserver/caddy.git
caddytls: Fix resolvers option of acme issuer (Caddyfile)
Reported in: https://caddy.community/t/dns-challenge-with-namecheap-and-split-horizon-dns/9611/17?u=matt
This commit is contained in:
parent
00e6b77fe4
commit
9859ab8148
|
@ -345,9 +345,6 @@ func (iss *ACMEIssuer) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
|
||||||
iss.Challenges.DNS.ProviderRaw = caddyconfig.JSONModuleObject(dnsProvModuleInstance, "name", provName, nil)
|
iss.Challenges.DNS.ProviderRaw = caddyconfig.JSONModuleObject(dnsProvModuleInstance, "name", provName, nil)
|
||||||
|
|
||||||
case "resolvers":
|
case "resolvers":
|
||||||
if !d.NextArg() {
|
|
||||||
return d.ArgErr()
|
|
||||||
}
|
|
||||||
if iss.Challenges == nil {
|
if iss.Challenges == nil {
|
||||||
iss.Challenges = new(ChallengesConfig)
|
iss.Challenges = new(ChallengesConfig)
|
||||||
}
|
}
|
||||||
|
@ -355,6 +352,9 @@ func (iss *ACMEIssuer) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
|
||||||
iss.Challenges.DNS = new(DNSChallengeConfig)
|
iss.Challenges.DNS = new(DNSChallengeConfig)
|
||||||
}
|
}
|
||||||
iss.Challenges.DNS.Resolvers = d.RemainingArgs()
|
iss.Challenges.DNS.Resolvers = d.RemainingArgs()
|
||||||
|
if len(iss.Challenges.DNS.Resolvers) == 0 {
|
||||||
|
return d.ArgErr()
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return d.Errf("unrecognized ACME issuer property: %s", d.Val())
|
return d.Errf("unrecognized ACME issuer property: %s", d.Val())
|
||||||
|
|
Loading…
Reference in New Issue