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
caddyhttp: Update host matcher docs about wildcards
Matthew Holt committed
Apr 1, 2020 at 11:40 UTC
0d2a3511dc8489abf93cb941b4ffeaf2473529a4
1 file changed
+9
modules/caddyhttp/matchers.go
+9
@@ -42,6 +42,15 @@ type (
42
//
43
// Automatic HTTPS can be
44
// [customized or disabled](/docs/modules/http#servers/automatic_https).
45
+ //
46
+ // Wildcards (`*`) may be used to represent exactly one label of the
47
+ // hostname, in accordance with RFC 1034 (because host matchers are also
48
+ // used for automatic HTTPS which influences TLS certificates). Thus,
49
+ // a host of `*` matches hosts like `localhost` or `internal` but not
50
+ // `example.com`. To catch all hosts, omit the host matcher entirely.
51
+ //
52
+ // The wildcard can be useful for matching all subdomains, for example:
53
+ // `*.example.com` matches `foo.example.com` but not `foo.bar.example.com`.
54
MatchHost []string
55
56
// MatchPath matches requests by the URI's path (case-insensitive). Path