From 792fca40f18b7c528b00a7dea508bdfd0821dd8c Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Wed, 2 Dec 2020 13:27:08 -0700 Subject: Minor comments --- modules/caddyhttp/server.go | 3 +++ modules/caddytls/connpolicy.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go index cff0f2e..ad873c8 100644 --- a/modules/caddyhttp/server.go +++ b/modules/caddyhttp/server.go @@ -74,6 +74,9 @@ type Server struct { // handlers are executed sequentially. The sequence of invoked // handlers comprises a compiled middleware chain that flows // from each matching route and its handlers to the next. + // + // By default, all unrouted requests receive a 200 OK response + // to indicate the server is working. Routes RouteList `json:"routes,omitempty"` // Errors is how this server will handle errors returned from any diff --git a/modules/caddytls/connpolicy.go b/modules/caddytls/connpolicy.go index ebf96e6..6c7fe3f 100644 --- a/modules/caddytls/connpolicy.go +++ b/modules/caddytls/connpolicy.go @@ -66,7 +66,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?) + // (TODO: this map does not account for wildcards, see if this is a problem in practice? look for reports of high connection latency with wildcard certs but low latency for non-wildcards in multi-thousand-cert deployments) indexedBySNI := make(map[string]ConnectionPolicies) if len(cp) > 30 { for _, p := range cp { -- cgit v1.2.3