From 5e5af50e64a33ecd9c91aaa773d4f8428945ac74 Mon Sep 17 00:00:00 2001 From: Rainer Borene Date: Sun, 28 Nov 2021 19:22:26 -0300 Subject: caddyfile: make renew_interval option configurable (#4451) --- caddyconfig/httpcaddyfile/tlsapp.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'caddyconfig/httpcaddyfile/tlsapp.go') diff --git a/caddyconfig/httpcaddyfile/tlsapp.go b/caddyconfig/httpcaddyfile/tlsapp.go index 0fe1fc5..b11addc 100644 --- a/caddyconfig/httpcaddyfile/tlsapp.go +++ b/caddyconfig/httpcaddyfile/tlsapp.go @@ -286,6 +286,14 @@ func (st ServerType) buildTLSApp( tlsApp.Automation.StorageCleanInterval = storageCleanInterval } + // set the expired certificates renew interval if configured + if renewCheckInterval, ok := options["renew_interval"].(caddy.Duration); ok { + if tlsApp.Automation == nil { + tlsApp.Automation = new(caddytls.AutomationConfig) + } + tlsApp.Automation.RenewCheckInterval = renewCheckInterval + } + // if any hostnames appear on the same server block as a key with // no host, they will not be used with route matchers because the // hostless key matches all hosts, therefore, it wouldn't be -- cgit v1.2.3