From 0d2a3511dc8489abf93cb941b4ffeaf2473529a4 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Wed, 1 Apr 2020 11:40:59 -0600 Subject: [PATCH] caddyhttp: Update host matcher docs about wildcards --- modules/caddyhttp/matchers.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/caddyhttp/matchers.go b/modules/caddyhttp/matchers.go index 19f6bf29f..f69fc67e3 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