Minor tweaks to docs/comments

This commit is contained in:
Matthew Holt 2020-02-14 11:00:46 -07:00
parent 15bf9c196c
commit 2cc5d2227d
3 changed files with 15 additions and 13 deletions

View File

@ -72,7 +72,12 @@ type (
// MatchQuery matches requests by URI's query string. // MatchQuery matches requests by URI's query string.
MatchQuery url.Values MatchQuery url.Values
// MatchHeader matches requests by header fields. // MatchHeader matches requests by header fields. It performs fast,
// exact string comparisons of the field values. Fast prefix, suffix,
// and substring matches can also be done by suffixing, prefixing, or
// surrounding the value with the wildcard `*` character, respectively.
// If a list is null, the header must not exist. If the list is empty,
// the field must simply exist, regardless of its value.
MatchHeader http.Header MatchHeader http.Header
// MatchHeaderRE matches requests by a regular expression on header fields. // MatchHeaderRE matches requests by a regular expression on header fields.

View File

@ -324,16 +324,13 @@ type HTTPErrorConfig struct {
// chain returns an error. In an error route, extra // chain returns an error. In an error route, extra
// placeholders are available: // placeholders are available:
// //
// {http.error.status_code} // Placeholder | Description
// The recommended HTTP status code // ------------|---------------
// {http.error.status_text} // `{http.error.status_code}` | The recommended HTTP status code
// The status text associated with the recommended status code // `{http.error.status_text}` | The status text associated with the recommended status code
// {http.error.message} // `{http.error.message}` | The error message
// The error message // `{http.error.trace}` | The origin of the error
// {http.error.trace} // `{http.error.id}` | An identifier for this occurrence of the error
// The origin of the error
// {http.error.id}
// A short, human-conveyable ID for the error
Routes RouteList `json:"routes,omitempty"` Routes RouteList `json:"routes,omitempty"`
} }

View File

@ -14,8 +14,8 @@ func init() {
caddy.RegisterModule(CustomCertSelectionPolicy{}) caddy.RegisterModule(CustomCertSelectionPolicy{})
} }
// CertSelectionPolicy represents a policy for selecting the certificate used // CustomCertSelectionPolicy represents a policy for selecting the certificate
// to complete a handshake when there may be multiple options. All fields // used to complete a handshake when there may be multiple options. All fields
// specified must match the candidate certificate for it to be chosen. // specified must match the candidate certificate for it to be chosen.
// This was needed to solve https://github.com/caddyserver/caddy/issues/2588. // This was needed to solve https://github.com/caddyserver/caddy/issues/2588.
type CustomCertSelectionPolicy struct { type CustomCertSelectionPolicy struct {