Skip to content

Commit

Permalink
Minor comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mholt committed Dec 2, 2020
1 parent 9157051 commit 792fca4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions modules/caddyhttp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion modules/caddytls/connpolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 792fca4

Please sign in to comment.