Skip to content

Commit

Permalink
feat(ipv6): add ipv6 address support to filebeat http endpoint
Browse files Browse the repository at this point in the history
replace string concat with stdlib func
  • Loading branch information
kruskall committed Mar 3, 2025
1 parent a964b89 commit bae5fc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x-pack/filebeat/input/http_endpoint/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func newHTTPEndpoint(config config) (*httpEndpoint, error) {
return nil, err
}

addr := fmt.Sprintf("%v:%v", config.ListenAddress, config.ListenPort)
addr := net.JoinHostPort(config.ListenAddress, config.ListenPort)

var tlsConfig *tls.Config
tlsConfigBuilder, err := tlscommon.LoadTLSServerConfig(config.TLS)
Expand Down Expand Up @@ -370,7 +370,7 @@ func newHandler(ctx context.Context, c config, prg *program, pub func(beat.Event
zap.DebugLevel,
)
h.reqLogger = zap.New(core)
h.host = c.ListenAddress + ":" + c.ListenPort
h.host = net.JoinHostPort(c.ListenAddress, c.ListenPort)
if c.TLS != nil && c.TLS.IsEnabled() {
h.scheme = "https"
} else {
Expand Down

0 comments on commit bae5fc3

Please sign in to comment.