summaryrefslogtreecommitdiff
path: root/modules/caddyhttp
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2020-04-01 11:40:59 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2020-04-01 11:41:04 -0600
commit0d2a3511dc8489abf93cb941b4ffeaf2473529a4 (patch)
treed86422eab774176b34cb19dbc8d843b2601d0f15 /modules/caddyhttp
parent73643ea736ca7c6a9ef32dbf78b38fbcdf5e92b2 (diff)
caddyhttp: Update host matcher docs about wildcards
Diffstat (limited to 'modules/caddyhttp')
-rw-r--r--modules/caddyhttp/matchers.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/caddyhttp/matchers.go b/modules/caddyhttp/matchers.go
index 19f6bf2..f69fc67 100644
--- a/modules/caddyhttp/matchers.go
+++ b/modules/caddyhttp/matchers.go
@@ -42,6 +42,15 @@ type (
//
// Automatic HTTPS can be
// [customized or disabled](/docs/modules/http#servers/automatic_https).
+ //
+ // Wildcards (`*`) may be used to represent exactly one label of the
+ // hostname, in accordance with RFC 1034 (because host matchers are also
+ // used for automatic HTTPS which influences TLS certificates). Thus,
+ // a host of `*` matches hosts like `localhost` or `internal` but not
+ // `example.com`. To catch all hosts, omit the host matcher entirely.
+ //
+ // The wildcard can be useful for matching all subdomains, for example:
+ // `*.example.com` matches `foo.example.com` but not `foo.bar.example.com`.
MatchHost []string
// MatchPath matches requests by the URI's path (case-insensitive). Path