@marcel91200 / caddy Mirror · read-only / commits / 26d633ba
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 13, 21:45 UTC

httpcaddyfile: Disabling OCSP stapling for both managed and unmanaged (#4589)

Francis Lavoie committed Feb 19, 2022 at 16:20 UTC 26d633baf83994e79d2961fa9f5b37ef5b0ab800
2 files changed +10 -2
caddyconfig/httpcaddyfile/tlsapp.go
+5
@@ -301,6 +301,11 @@ func (st ServerType) buildTLSApp(
301 tlsApp.Automation.RenewCheckInterval = renewCheckInterval
302 }
303
304 + // set whether OCSP stapling should be disabled for manually-managed certificates
305 + if ocspConfig, ok := options["ocsp_stapling"].(certmagic.OCSPConfig); ok {
306 + tlsApp.DisableOCSPStapling = ocspConfig.DisableStapling
307 + }
308 +
309 // if any hostnames appear on the same server block as a key with
310 // no host, they will not be used with route matchers because the
311 // hostless key matches all hosts, therefore, it wouldn't be
caddytest/integration/caddyfile_adapt/global_options.txt
+5 -2
@@ -10,6 +10,7 @@
10 }
11 acme_ca https://example.com
12 acme_ca_root /path/to/ca.crt
13 + ocsp_stapling off
14
15 email test@example.com
16 admin off
@@ -61,7 +62,8 @@
62 "module": "internal"
63 }
64 ],
64 - "key_type": "ed25519"
65 + "key_type": "ed25519",
66 + "disable_ocsp_stapling": true
67 }
68 ],
69 "on_demand": {
@@ -71,7 +73,8 @@
73 },
74 "ask": "https://example.com"
75 }
74 - }
76 + },
77 + "disable_ocsp_stapling": true
78 }
79 }
80 }