Skip to content

Commit

Permalink
backport of commit 49f7423 (#16335)
Browse files Browse the repository at this point in the history
Co-authored-by: cskh <hui.kang@hashicorp.com>
  • Loading branch information
hc-github-team-consul-core and huikang authored Feb 21, 2023
1 parent 27b02d5 commit e2ec1f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,8 @@ func (a *Agent) listenHTTP() ([]apiServer, error) {
for _, l := range listeners {
var tlscfg *tls.Config
_, isTCP := l.(*tcpKeepAliveListener)
if isTCP && proto == "https" {
isUnix := l.Addr().Network() == "unix"
if (isTCP || isUnix) && proto == "https" {
tlscfg = a.tlsConfigurator.IncomingHTTPSConfig()
l = tls.NewListener(l, tlscfg)
}
Expand Down

0 comments on commit e2ec1f9

Please sign in to comment.