summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorPeter Magnusson <git@kmpm.se>2021-06-07 20:25:12 +0200
committerGitHub <noreply@github.com>2021-06-07 12:25:12 -0600
commit4c2da188419cf087049a6a3d4d08a859ac94c397 (patch)
treef057d215ca84716d3ad46bf631a0998874e6d59f /modules
parentf9b54454a19e2b070159ce8d2af76d819658244e (diff)
caddytls: Add Caddyfile support for `propagation_timeout` (#4178)
* add propagation_timeout to UnmarshalCaddyfile - Closes #4177 * added caddyfile_adapt test
Diffstat (limited to 'modules')
-rw-r--r--modules/caddytls/acmeissuer.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/caddytls/acmeissuer.go b/modules/caddytls/acmeissuer.go
index bbcd5d7..6085044 100644
--- a/modules/caddytls/acmeissuer.go
+++ b/modules/caddytls/acmeissuer.go
@@ -387,6 +387,22 @@ func (iss *ACMEIssuer) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
return err
}
iss.Challenges.DNS.ProviderRaw = caddyconfig.JSONModuleObject(unm, "name", provName, nil)
+ case "propagation_timeout":
+ if !d.NextArg() {
+ return d.ArgErr()
+ }
+ timeoutStr := d.Val()
+ timeout, err := caddy.ParseDuration(timeoutStr)
+ if err != nil {
+ return d.Errf("invalid propagation_timeout duration %s: %v", timeoutStr, err)
+ }
+ if iss.Challenges == nil {
+ iss.Challenges = new(ChallengesConfig)
+ }
+ if iss.Challenges.DNS == nil {
+ iss.Challenges.DNS = new(DNSChallengeConfig)
+ }
+ iss.Challenges.DNS.PropagationTimeout = caddy.Duration(timeout)
case "resolvers":
if iss.Challenges == nil {