Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
Minor tweaks to docs/comments
Matthew Holt committed
Feb 14, 2020 at 11:00 UTC
2cc5d2227dd8b8ad2d71112709ec29ab34fcd0ea
3 files changed
+15
-13
modules/caddyhttp/matchers.go
+6
-1
@@ -72,7 +72,12 @@ type (
72
// MatchQuery matches requests by URI's query string.
73
MatchQuery url.Values
74
75
- // MatchHeader matches requests by header fields.
75
+ // MatchHeader matches requests by header fields. It performs fast,
76
+ // exact string comparisons of the field values. Fast prefix, suffix,
77
+ // and substring matches can also be done by suffixing, prefixing, or
78
+ // surrounding the value with the wildcard `*` character, respectively.
79
+ // If a list is null, the header must not exist. If the list is empty,
80
+ // the field must simply exist, regardless of its value.
81
MatchHeader http.Header
82
83
// MatchHeaderRE matches requests by a regular expression on header fields.
modules/caddyhttp/server.go
+7
-10
@@ -324,16 +324,13 @@ type HTTPErrorConfig struct {
324
// chain returns an error. In an error route, extra
325
// placeholders are available:
326
//
327
- // {http.error.status_code}
328
- // The recommended HTTP status code
329
- // {http.error.status_text}
330
- // The status text associated with the recommended status code
331
- // {http.error.message}
332
- // The error message
333
- // {http.error.trace}
334
- // The origin of the error
335
- // {http.error.id}
336
- // A short, human-conveyable ID for the error
327
+ // Placeholder | Description
328
+ // ------------|---------------
329
+ // `{http.error.status_code}` | The recommended HTTP status code
330
+ // `{http.error.status_text}` | The status text associated with the recommended status code
331
+ // `{http.error.message}` | The error message
332
+ // `{http.error.trace}` | The origin of the error
333
+ // `{http.error.id}` | An identifier for this occurrence of the error
334
Routes RouteList `json:"routes,omitempty"`
335
}
336
modules/caddytls/certselection.go
+2
-2
@@ -14,8 +14,8 @@ func init() {
14
caddy.RegisterModule(CustomCertSelectionPolicy{})
15
}
16
17
-// CertSelectionPolicy represents a policy for selecting the certificate used
18
-// to complete a handshake when there may be multiple options. All fields
17
+// CustomCertSelectionPolicy represents a policy for selecting the certificate
18
+// used to complete a handshake when there may be multiple options. All fields
19
// specified must match the candidate certificate for it to be chosen.
20
// This was needed to solve https://github.com/caddyserver/caddy/issues/2588.
21
type CustomCertSelectionPolicy struct {