Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
httpcaddyfile: Don't remove empty TLS conn policies (fix #3249)
Not sure why I thought that would be a good idea
Matthew Holt committed
Apr 10, 2020 at 08:24 UTC
3bee569a8ae2d72490cd876c3c218963fe65d224
1 file changed
-11
caddyconfig/httpcaddyfile/httptype.go
-11
@@ -569,18 +569,7 @@ func detectConflictingSchemes(srv *caddyhttp.Server, serverBlocks []serverBlock,
569
// consolidateConnPolicies removes empty TLS connection policies and combines
570
// equivalent ones for a cleaner overall output.
571
func consolidateConnPolicies(cps caddytls.ConnectionPolicies) (caddytls.ConnectionPolicies, error) {
572
- empty := new(caddytls.ConnectionPolicy)
573
-
572
for i := 0; i < len(cps); i++ {
575
- // if the connection policy is empty or has
576
- // only matchers, we can remove it entirely
577
- empty.MatchersRaw = cps[i].MatchersRaw
578
- if reflect.DeepEqual(empty, cps[i]) {
579
- cps = append(cps[:i], cps[i+1:]...)
580
- i--
581
- continue
582
- }
583
-
573
// compare it to the others
574
for j := 0; j < len(cps); j++ {
575
if j == i {