summaryrefslogtreecommitdiff
path: root/modules/caddytls
diff options
context:
space:
mode:
authorYannick Ihmels <yannick@ihmels.org>2023-01-06 20:44:00 +0100
committerGitHub <noreply@github.com>2023-01-06 14:44:00 -0500
commit55035d327a2dbd32887db0b1dcbc25dba590798f (patch)
treeaa34b1c900009e6ae361e4d88d2ab7555618b578 /modules/caddytls
parent4e9ad50f6503a347e85b7030afa616a83f145394 (diff)
caddytls: Add `dns_ttl` config, improve Caddyfile `tls` options (#5287)
Diffstat (limited to 'modules/caddytls')
-rw-r--r--modules/caddytls/acmeissuer.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/caddytls/acmeissuer.go b/modules/caddytls/acmeissuer.go
index 2f752ed..12e300e 100644
--- a/modules/caddytls/acmeissuer.go
+++ b/modules/caddytls/acmeissuer.go
@@ -266,6 +266,7 @@ func (iss *ACMEIssuer) GetACMEIssuer() *ACMEIssuer { return iss }
// propagation_delay <duration>
// propagation_timeout <duration>
// resolvers <dns_servers...>
+// dns_ttl <duration>
// dns_challenge_override_domain <domain>
// preferred_chains [smallest] {
// root_common_name <common_names...>
@@ -445,6 +446,23 @@ func (iss *ACMEIssuer) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
return d.ArgErr()
}
+ case "dns_ttl":
+ if !d.NextArg() {
+ return d.ArgErr()
+ }
+ ttlStr := d.Val()
+ ttl, err := caddy.ParseDuration(ttlStr)
+ if err != nil {
+ return d.Errf("invalid dns_ttl duration %s: %v", ttlStr, err)
+ }
+ if iss.Challenges == nil {
+ iss.Challenges = new(ChallengesConfig)
+ }
+ if iss.Challenges.DNS == nil {
+ iss.Challenges.DNS = new(DNSChallengeConfig)
+ }
+ iss.Challenges.DNS.TTL = caddy.Duration(ttl)
+
case "dns_challenge_override_domain":
arg := d.RemainingArgs()
if len(arg) != 1 {