mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 14:13:48 +03:00
httpcaddyfile: Don't remove empty TLS conn policies (fix #3249)
Not sure why I thought that would be a good idea
This commit is contained in:
parent
999ab22b8c
commit
3bee569a8a
1 changed files with 0 additions and 11 deletions
|
@ -569,18 +569,7 @@ func detectConflictingSchemes(srv *caddyhttp.Server, serverBlocks []serverBlock,
|
|||
// consolidateConnPolicies removes empty TLS connection policies and combines
|
||||
// equivalent ones for a cleaner overall output.
|
||||
func consolidateConnPolicies(cps caddytls.ConnectionPolicies) (caddytls.ConnectionPolicies, error) {
|
||||
empty := new(caddytls.ConnectionPolicy)
|
||||
|
||||
for i := 0; i < len(cps); i++ {
|
||||
// if the connection policy is empty or has
|
||||
// only matchers, we can remove it entirely
|
||||
empty.MatchersRaw = cps[i].MatchersRaw
|
||||
if reflect.DeepEqual(empty, cps[i]) {
|
||||
cps = append(cps[:i], cps[i+1:]...)
|
||||
i--
|
||||
continue
|
||||
}
|
||||
|
||||
// compare it to the others
|
||||
for j := 0; j < len(cps); j++ {
|
||||
if j == i {
|
||||
|
|
Loading…
Reference in a new issue