diff options
author | Francis Lavoie <lavofr@gmail.com> | 2021-05-02 13:57:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-02 11:57:28 -0600 |
commit | 6e0e3e1537c399faabd30cc08a9fe68a7be87639 (patch) | |
tree | 27e7ba701584c60d3b9e1ed857ab3203fd6bd7c0 /caddyconfig/httpcaddyfile/tlsapp.go | |
parent | 53ececda21f77d000ee893bc981d6ec5c33872f8 (diff) |
httpcaddyfile: Add global option for `storage_clean_interval` (#4134)
Followup to https://github.com/caddyserver/caddy/commit/42b7134ffa3bf3e9e86514c82407979c2627a5ab
Diffstat (limited to 'caddyconfig/httpcaddyfile/tlsapp.go')
-rw-r--r-- | caddyconfig/httpcaddyfile/tlsapp.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/caddyconfig/httpcaddyfile/tlsapp.go b/caddyconfig/httpcaddyfile/tlsapp.go index 72f99be..c4af8e4 100644 --- a/caddyconfig/httpcaddyfile/tlsapp.go +++ b/caddyconfig/httpcaddyfile/tlsapp.go @@ -278,6 +278,14 @@ func (st ServerType) buildTLSApp( tlsApp.Automation.OnDemand = onDemand } + // set the storage clean interval if configured + if storageCleanInterval, ok := options["storage_clean_interval"].(caddy.Duration); ok { + if tlsApp.Automation == nil { + tlsApp.Automation = new(caddytls.AutomationConfig) + } + tlsApp.Automation.StorageCleanInterval = storageCleanInterval + } + // 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 |