Skip to content

Commit e7ecc7e

Browse files
authored
Make it possible to configure the DisableStorageCheck setting for certmagic (#6368)
See discussion about this setting in caddyserver/certmagic#201
1 parent 7088605 commit e7ecc7e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

modules/caddytls/tls.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,16 @@ type TLS struct {
8181
// EXPERIMENTAL. Subject to change.
8282
DisableOCSPStapling bool `json:"disable_ocsp_stapling,omitempty"`
8383

84+
// Disables checks in certmagic that the configured storage is ready
85+
// and able to handle writing new content to it. These checks are
86+
// intended to prevent information loss (newly issued certificates), but
87+
// can be expensive on the storage.
88+
//
89+
// Disabling these checks should only be done when the storage
90+
// can be trusted to have enough capacity and no other problems.
91+
// EXPERIMENTAL. Subject to change.
92+
DisableStorageCheck bool `json:"disable_storage_check,omitempty"`
93+
8494
certificateLoaders []CertificateLoader
8595
automateNames []string
8696
ctx caddy.Context
@@ -255,6 +265,7 @@ func (t *TLS) Provision(ctx caddy.Context) error {
255265
OCSP: certmagic.OCSPConfig{
256266
DisableStapling: t.DisableOCSPStapling,
257267
},
268+
DisableStorageCheck: t.DisableStorageCheck,
258269
})
259270
certCacheMu.RUnlock()
260271
for _, loader := range t.certificateLoaders {

0 commit comments

Comments
 (0)