Skip to content

Commit

Permalink
caddytls: Update docs for on-demand config
Browse files Browse the repository at this point in the history
  • Loading branch information
mholt committed Aug 9, 2023
1 parent a8492c0 commit 080db93
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions modules/caddytls/automation.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,29 +459,32 @@ type DNSChallengeConfig struct {
// Caddy can "ask" if it should be allowed to manage
// certificates for a given hostname.
type OnDemandConfig struct {
// An optional rate limit to throttle the
// issuance of certificates from handshakes.
RateLimit *RateLimit `json:"rate_limit,omitempty"`

// REQUIRED. If Caddy needs to obtain/renew a certificate
// during a TLS handshake, it will perform a quick
// HTTP request to this URL to check if it should be
// allowed to try to get a certificate for the name
// 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.
// REQUIRED. If Caddy needs to load a certificate from
// storage or obtain/renew a certificate during a TLS
// handshake, it will perform a quick HTTP request to
// this URL to check if it should be allowed to try to
// get a certificate for the name 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.
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 {
// A duration value. A certificate may be obtained 'burst'
// times during this interval.
// A duration value. Storage may be checked and a certificate may be
// obtained 'burst' times during this interval.
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"`
}

Expand Down

0 comments on commit 080db93

Please sign in to comment.