From d6e86972ceecd70cae2cdd4aae98aabf5ac6f9e4 Mon Sep 17 00:00:00 2001 From: Serge Khorun <104387024+sergekh2@users.noreply.github.com> Date: Wed, 12 Jun 2024 11:21:39 -0700 Subject: [PATCH] Stop defaulting to localhost for metrics (#160) --- core/node/infra/metrics.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/node/infra/metrics.go b/core/node/infra/metrics.go index 9e5d6f685..1fc92c06e 100644 --- a/core/node/infra/metrics.go +++ b/core/node/infra/metrics.go @@ -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, }