From 012d235314fcc2a27302d00ee6f53459e54c0eb8 Mon Sep 17 00:00:00 2001 From: Marc Easen Date: Tue, 26 Oct 2021 20:54:19 +0100 Subject: httpcaddyfile: Empty tls policy for internal http localhost (#4398) * test: replicated empty tls automation policy issue * fix: empty tls policy for an http:// endpoint running on a non-standard http port --- caddyconfig/httpcaddyfile/directives.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'caddyconfig') diff --git a/caddyconfig/httpcaddyfile/directives.go b/caddyconfig/httpcaddyfile/directives.go index 360f91e..9da205e 100644 --- a/caddyconfig/httpcaddyfile/directives.go +++ b/caddyconfig/httpcaddyfile/directives.go @@ -485,7 +485,7 @@ func (sb serverBlock) hostsFromKeysNotHTTP(httpPort string) []string { if addr.Host == "" { continue } - if addr.Scheme != "http" && addr.Port != httpPort { + if addr.Scheme != "http" || addr.Port != httpPort { hostMap[addr.Host] = struct{}{} } } -- cgit v1.2.3