diff --git a/agent/agent.go b/agent/agent.go index 78a06761ab4e..64df2cb8cb0c 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -933,7 +933,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) }