@marcel91200 / caddy Mirror · read-only / commits / e7ecc7ed
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 12, 10:45 UTC

Make it possible to configure the `DisableStorageCheck` setting for certmagic (#6368)

See discussion about this setting in https://github.com/caddyserver/certmagic/issues/201

Andreas Kohn committed Jun 4, 2024 at 15:00 UTC e7ecc7ede2f0f749530b0c2e685b99954b9591ce
1 file changed +11
modules/caddytls/tls.go
+11
@@ -81,6 +81,16 @@ type TLS struct {
81 // EXPERIMENTAL. Subject to change.
82 DisableOCSPStapling bool `json:"disable_ocsp_stapling,omitempty"`
83
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 +
94 certificateLoaders []CertificateLoader
95 automateNames []string
96 ctx caddy.Context
@@ -255,6 +265,7 @@ func (t *TLS) Provision(ctx caddy.Context) error {
265 OCSP: certmagic.OCSPConfig{
266 DisableStapling: t.DisableOCSPStapling,
267 },
268 + DisableStorageCheck: t.DisableStorageCheck,
269 })
270 certCacheMu.RUnlock()
271 for _, loader := range t.certificateLoaders {