Skip to content

Commit

Permalink
Stop defaulting to localhost for metrics (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergekh2 authored Jun 12, 2024
1 parent 269b6c0 commit d6e8697
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions core/node/infra/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,8 @@ func (m *Metrics) StartMetricsServer(ctx context.Context, config config.MetricsC

mux.Handle("/metrics", metricsHandler)

iface := config.Interface
if iface == "" {
iface = "localhost"
}
m.httpServer = &http.Server{
Addr: fmt.Sprintf("%s:%d", iface, config.Port),
Addr: fmt.Sprintf("%s:%d", config.Interface, config.Port),
Handler: mux,
}

Expand Down

0 comments on commit d6e8697

Please sign in to comment.