summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2020-08-21 20:30:14 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2020-08-21 20:30:14 -0600
commit744d04c2585d50f64cf3d43d139c310a18e78f73 (patch)
tree71a94b5786fb5e6698f56c3bd6e3a62154cf7d44 /modules
parentecbc1f85c5ada6c9e50a3f0b0724b8d7731349ba (diff)
caddytls: Configure custom DNS resolvers for DNS challenge (close #2476)
And #3391 Maybe also related: #3664
Diffstat (limited to 'modules')
-rw-r--r--modules/caddytls/acmeissuer.go1
-rw-r--r--modules/caddytls/automation.go4
2 files changed, 5 insertions, 0 deletions
diff --git a/modules/caddytls/acmeissuer.go b/modules/caddytls/acmeissuer.go
index 963143b..0797435 100644
--- a/modules/caddytls/acmeissuer.go
+++ b/modules/caddytls/acmeissuer.go
@@ -112,6 +112,7 @@ func (iss *ACMEIssuer) Provision(ctx caddy.Context) error {
DNSProvider: val.(certmagic.ACMEDNSProvider),
TTL: time.Duration(iss.Challenges.DNS.TTL),
PropagationTimeout: time.Duration(iss.Challenges.DNS.PropagationTimeout),
+ Resolvers: iss.Challenges.DNS.Resolvers,
}
}
}
diff --git a/modules/caddytls/automation.go b/modules/caddytls/automation.go
index 502a631..1612391 100644
--- a/modules/caddytls/automation.go
+++ b/modules/caddytls/automation.go
@@ -295,6 +295,10 @@ type DNSChallengeConfig struct {
// How long to wait for DNS record to propagate.
PropagationTimeout caddy.Duration `json:"propagation_timeout,omitempty"`
+ // Custom DNS resolvers to prefer over system/built-in defaults.
+ // Often necessary to configure when using split-horizon DNS.
+ Resolvers []string `json:"resolvers,omitempty"`
+
solver acmez.Solver
}