aboutsummaryrefslogtreecommitdiffhomepage
path: root/caddyconfig/httpcaddyfile/tlsapp.go
diff options
context:
space:
mode:
authorFrancis Lavoie <[email protected]>2024-11-05 12:47:41 -0500
committerGitHub <[email protected]>2024-11-05 10:47:41 -0700
commit5c8dc344181c49bc7feade4a293bb4eed882b838 (patch)
tree9ecf1af4532361686cc60910faf70b040af8bbe3 /caddyconfig/httpcaddyfile/tlsapp.go
parent5823eccf99d9fc6b4ffba8a78acfdb59c4ec0c97 (diff)
downloadcaddy-5c8dc344181c49bc7feade4a293bb4eed882b838.tar.gz
caddy-5c8dc344181c49bc7feade4a293bb4eed882b838.zip
caddytls: Allow disabling storage cleaning, avoids writing two files (#6593)
Diffstat (limited to 'caddyconfig/httpcaddyfile/tlsapp.go')
-rw-r--r--caddyconfig/httpcaddyfile/tlsapp.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/caddyconfig/httpcaddyfile/tlsapp.go b/caddyconfig/httpcaddyfile/tlsapp.go
index bec860610..ea5ac92c7 100644
--- a/caddyconfig/httpcaddyfile/tlsapp.go
+++ b/caddyconfig/httpcaddyfile/tlsapp.go
@@ -349,6 +349,16 @@ func (st ServerType) buildTLSApp(
tlsApp.Automation.OnDemand = onDemand
}
+ // if the storage clean interval is a boolean, then it's "off" to disable cleaning
+ if sc, ok := options["storage_check"].(string); ok && sc == "off" {
+ tlsApp.DisableStorageCheck = true
+ }
+
+ // if the storage clean interval is a boolean, then it's "off" to disable cleaning
+ if sci, ok := options["storage_clean_interval"].(bool); ok && !sci {
+ tlsApp.DisableStorageClean = true
+ }
+
// set the storage clean interval if configured
if storageCleanInterval, ok := options["storage_clean_interval"].(caddy.Duration); ok {
if tlsApp.Automation == nil {