summaryrefslogtreecommitdiff
path: root/caddyconfig
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-09-18 09:45:21 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-09-18 09:45:21 -0600
commitbc9f9448370d7a5535b33e7407760998b4875e45 (patch)
treeca4481d3f3cd14e95d03cd0fbc4788b4191571d5 /caddyconfig
parent4c289fc6ad3d7c2afa69e36cdf2cc9a172cb1c9c (diff)
host matcher: Strip [ ] from IPv6 addresses
Diffstat (limited to 'caddyconfig')
-rw-r--r--caddyconfig/httpcaddyfile/httptype.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/caddyconfig/httpcaddyfile/httptype.go b/caddyconfig/httpcaddyfile/httptype.go
index 32791e9..4588b8f 100644
--- a/caddyconfig/httpcaddyfile/httptype.go
+++ b/caddyconfig/httpcaddyfile/httptype.go
@@ -268,7 +268,7 @@ func (st *ServerType) serversFromPairings(
}
if _, ok := sblock.pile["tls.off"]; ok {
// tls off: disable TLS (and automatic HTTPS) for server block's names
- if srv.AutoHTTPS == nil {
+ if srv.AutoHTTPS == nil && len(autoHTTPSQualifiedHosts) > 0 {
srv.AutoHTTPS = new(caddyhttp.AutoHTTPSConfig)
}
srv.AutoHTTPS.Skip = append(srv.AutoHTTPS.Skip, autoHTTPSQualifiedHosts...)