diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2020-03-20 15:51:37 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2020-03-20 15:51:37 -0600 |
commit | 3c1def243020a3897121d4c5badf07ed45d2397d (patch) | |
tree | 01be16286024a88043a4575962e03924bded36b6 /modules/caddytls/connpolicy.go | |
parent | b583007c49975c5c368630af30bbe3b116935df0 (diff) |
caddytls: Support wildcard matching in ServerName conn policy matcher
Diffstat (limited to 'modules/caddytls/connpolicy.go')
-rw-r--r-- | modules/caddytls/connpolicy.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/caddytls/connpolicy.go b/modules/caddytls/connpolicy.go index 395c55a..c821811 100644 --- a/modules/caddytls/connpolicy.go +++ b/modules/caddytls/connpolicy.go @@ -76,6 +76,7 @@ func (cp ConnectionPolicies) TLSConfig(ctx caddy.Context) *tls.Config { // using ServerName to match policies is extremely common, especially in configs // with lots and lots of different policies; we can fast-track those by indexing // them by SNI, so we don't have to iterate potentially thousands of policies + // (TODO: this map does not account for wildcards, see if this is a problem in practice?) indexedBySNI := make(map[string]ConnectionPolicies) if len(cp) > 30 { for _, p := range cp { |