Skip to content

Commit

Permalink
fix(caddyfile): reame var to be more intuitive
Browse files Browse the repository at this point in the history
  • Loading branch information
hainenber committed Sep 9, 2023
1 parent d3ee1cc commit 067ec1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions caddyconfig/httpcaddyfile/httptype.go
Original file line number Diff line number Diff line change
Expand Up @@ -723,13 +723,13 @@ func (st *ServerType) serversFromPairings(
// ensuring compatibility with behavior described in below link
// https://caddy.community/t/making-sense-of-auto-https-and-why-disabling-it-still-serves-https-instead-of-http/9761
createdTLSConnPolicies, ok := sblock.pile["tls.connection_policy"]
hasTLSDirectiveSpecified := (ok && len(createdTLSConnPolicies) > 0) ||
hasTLSEnabled := (ok && len(createdTLSConnPolicies) > 0) ||
(addr.Host != "" && srv.AutoHTTPS != nil && !sliceContains(srv.AutoHTTPS.Skip, addr.Host))

// we'll need to remember if the address qualifies for auto-HTTPS, so we
// can add a TLS conn policy if necessary
if addr.Scheme == "https" ||
(addr.Scheme != "http" && addr.Port != httpPort && hasTLSDirectiveSpecified) {
(addr.Scheme != "http" && addr.Port != httpPort && hasTLSEnabled) {
addressQualifiesForTLS = true
}
// predict whether auto-HTTPS will add the conn policy for us; if so, we
Expand Down

0 comments on commit 067ec1d

Please sign in to comment.