Skip to content

Commit

Permalink
Make it possible to configure the DisableStorageCheck setting for c…
Browse files Browse the repository at this point in the history
…ertmagic (#6368)

See discussion about this setting in caddyserver/certmagic#201
  • Loading branch information
ankon authored Jun 4, 2024
1 parent 7088605 commit e7ecc7e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions modules/caddytls/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ type TLS struct {
// EXPERIMENTAL. Subject to change.
DisableOCSPStapling bool `json:"disable_ocsp_stapling,omitempty"`

// Disables checks in certmagic that the configured storage is ready
// and able to handle writing new content to it. These checks are
// intended to prevent information loss (newly issued certificates), but
// can be expensive on the storage.
//
// Disabling these checks should only be done when the storage
// can be trusted to have enough capacity and no other problems.
// EXPERIMENTAL. Subject to change.
DisableStorageCheck bool `json:"disable_storage_check,omitempty"`

certificateLoaders []CertificateLoader
automateNames []string
ctx caddy.Context
Expand Down Expand Up @@ -255,6 +265,7 @@ func (t *TLS) Provision(ctx caddy.Context) error {
OCSP: certmagic.OCSPConfig{
DisableStapling: t.DisableOCSPStapling,
},
DisableStorageCheck: t.DisableStorageCheck,
})
certCacheMu.RUnlock()
for _, loader := range t.certificateLoaders {
Expand Down

0 comments on commit e7ecc7e

Please sign in to comment.