summaryrefslogtreecommitdiff
path: root/modules/caddytls
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddytls')
-rw-r--r--modules/caddytls/acmeissuer.go13
1 files changed, 3 insertions, 10 deletions
diff --git a/modules/caddytls/acmeissuer.go b/modules/caddytls/acmeissuer.go
index df071c4..43e758f 100644
--- a/modules/caddytls/acmeissuer.go
+++ b/modules/caddytls/acmeissuer.go
@@ -354,18 +354,11 @@ func (iss *ACMEIssuer) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
if iss.Challenges.DNS == nil {
iss.Challenges.DNS = new(DNSChallengeConfig)
}
- dnsProvModule, err := caddy.GetModule("dns.providers." + provName)
+ unm, err := caddyfile.UnmarshalModule(d, "dns.providers."+provName)
if err != nil {
- return d.Errf("getting DNS provider module named '%s': %v", provName, err)
+ return err
}
- dnsProvModuleInstance := dnsProvModule.New()
- if unm, ok := dnsProvModuleInstance.(caddyfile.Unmarshaler); ok {
- err = unm.UnmarshalCaddyfile(d.NewFromNextSegment())
- if err != nil {
- return err
- }
- }
- iss.Challenges.DNS.ProviderRaw = caddyconfig.JSONModuleObject(dnsProvModuleInstance, "name", provName, nil)
+ iss.Challenges.DNS.ProviderRaw = caddyconfig.JSONModuleObject(unm, "name", provName, nil)
case "resolvers":
if iss.Challenges == nil {