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

See discussion about this setting in caddyserver/certmagic#201
  • Loading branch information
ankon committed Jun 3, 2024
1 parent 7088605 commit 8997483
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 8997483

Please sign in to comment.