From 3c1def243020a3897121d4c5badf07ed45d2397d Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Fri, 20 Mar 2020 15:51:37 -0600 Subject: caddytls: Support wildcard matching in ServerName conn policy matcher --- modules/caddytls/connpolicy.go | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/caddytls/connpolicy.go') 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 { -- cgit v1.2.3