caddytls: Update docs for on-demand config

This commit is contained in:
Matthew Holt 2023-08-09 11:15:01 -06:00
parent a8492c064d
commit 080db93817
No known key found for this signature in database
GPG Key ID: 2A349DD577D586A5

View File

@ -459,29 +459,32 @@ type DNSChallengeConfig struct {
// Caddy can "ask" if it should be allowed to manage // Caddy can "ask" if it should be allowed to manage
// certificates for a given hostname. // certificates for a given hostname.
type OnDemandConfig struct { type OnDemandConfig struct {
// An optional rate limit to throttle the // REQUIRED. If Caddy needs to load a certificate from
// issuance of certificates from handshakes. // storage or obtain/renew a certificate during a TLS
RateLimit *RateLimit `json:"rate_limit,omitempty"` // handshake, it will perform a quick HTTP request to
// this URL to check if it should be allowed to try to
// REQUIRED. If Caddy needs to obtain/renew a certificate // get a certificate for the name in the "domain" query
// during a TLS handshake, it will perform a quick // string parameter, like so: `?domain=example.com`.
// HTTP request to this URL to check if it should be // The endpoint must return a 200 OK status if a certificate
// allowed to try to get a certificate for the name // is allowed; anything else will cause it to be denied.
// in the "domain" query string parameter, like so:
// `?domain=example.com`. The endpoint must return a
// 200 OK status if a certificate is allowed;
// anything else will cause it to be denied.
// Redirects are not followed. // Redirects are not followed.
Ask string `json:"ask,omitempty"` Ask string `json:"ask,omitempty"`
// DEPRECATED. An optional rate limit to throttle
// the checking of storage and the issuance of
// certificates from handshakes if not already in
// storage. WILL BE REMOVED IN A FUTURE RELEASE.
RateLimit *RateLimit `json:"rate_limit,omitempty"`
} }
// RateLimit specifies an interval with optional burst size. // DEPRECATED. RateLimit specifies an interval with optional burst size.
type RateLimit struct { type RateLimit struct {
// A duration value. A certificate may be obtained 'burst' // A duration value. Storage may be checked and a certificate may be
// times during this interval. // obtained 'burst' times during this interval.
Interval caddy.Duration `json:"interval,omitempty"` Interval caddy.Duration `json:"interval,omitempty"`
// How many times during an interval a certificate can be obtained. // How many times during an interval storage can be checked or a
// certificate can be obtained.
Burst int `json:"burst,omitempty"` Burst int `json:"burst,omitempty"`
} }