summaryrefslogtreecommitdiff
path: root/caddyconfig/httpcaddyfile/addresses.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2020-09-11 13:45:21 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2020-09-11 13:45:21 -0600
commit4217217badf220d7d2c25f43f955fdc8454f2c64 (patch)
treedd51a47ea592175b5652ff96702f6227d25c5e64 /caddyconfig/httpcaddyfile/addresses.go
parent1c5969b576ac6e4b147bc5c0dbf2f1b8e76849ef (diff)
httpcaddyfile: Properly record whether we added catch-all conn policy
We recently introduced `if !cp.SettingsEmpty()` which conditionally adds the connection policy to the list. If the condition evaluates to false, the policy wouldn't actually be added, even if hasCatchAllTLSConnPolicy was set to true on the previous line. Now we set that variable in accordance with whether we actually add the policy. While debugging this I noticed that catch-all policies added early in that loop (i.e. not at the end if we later determine we need one) are not always at the end of the list. They should be, though, since they are selected by which one matches first, and having a catch-all first would nullify any more specific ones later in the list. So I added a sort in consolidateConnPolicies to take care of that. Should fix #3670 and https://caddy.community/t/combining-on-demand-tls-with-custom-ssl-certs-doesnt-seem-to-work-in-2-1-1/9719 but I won't know for sure until somebody verifies it, since at least in the GitHub issue there is not yet enough information (the configs are redacted).
Diffstat (limited to 'caddyconfig/httpcaddyfile/addresses.go')
0 files changed, 0 insertions, 0 deletions