Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
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
Matthew Holt committed
Sep 9, 2020 at 10:21 UTC
9859ab8148435e64accd8d66e67db29fb5cbc9e7
1 file changed
+3
-3
modules/caddytls/acmeissuer.go
+3
-3
@@ -345,9 +345,6 @@ func (iss *ACMEIssuer) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
345
iss.Challenges.DNS.ProviderRaw = caddyconfig.JSONModuleObject(dnsProvModuleInstance, "name", provName, nil)
346
347
case "resolvers":
348
- if !d.NextArg() {
349
- return d.ArgErr()
350
- }
348
if iss.Challenges == nil {
349
iss.Challenges = new(ChallengesConfig)
350
}
@@ -355,6 +352,9 @@ func (iss *ACMEIssuer) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
352
iss.Challenges.DNS = new(DNSChallengeConfig)
353
}
354
iss.Challenges.DNS.Resolvers = d.RemainingArgs()
355
+ if len(iss.Challenges.DNS.Resolvers) == 0 {
356
+ return d.ArgErr()
357
+ }
358
359
default:
360
return d.Errf("unrecognized ACME issuer property: %s", d.Val())