From a7f47d381eb364346bd92de9ce4b8b6554e5774e Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Thu, 23 Apr 2026 17:47:06 +0200 Subject: [PATCH] fix(strelaypoolsrv): correct remote address logging Signed-off-by: Jakob Borg --- cmd/infra/strelaypoolsrv/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/infra/strelaypoolsrv/main.go b/cmd/infra/strelaypoolsrv/main.go index dd61dab8e..0871d5982 100644 --- a/cmd/infra/strelaypoolsrv/main.go +++ b/cmd/infra/strelaypoolsrv/main.go @@ -428,7 +428,7 @@ func handleRegister(w http.ResponseWriter, r *http.Request) { newRelay.URL = uri.String() } else if host != rhost && relayCert == nil { if debug { - log.Println("IP address advertised does not match client IP address", r.RemoteAddr, uri) + log.Println("IP address advertised does not match client IP address", rhost, uri) } http.Error(w, fmt.Sprintf("IP advertised %s does not match client IP %s", host, rhost), http.StatusUnauthorized) return @@ -452,13 +452,13 @@ func handleRegister(w http.ResponseWriter, r *http.Request) { case requests <- request{&newRelay, reschan, prometheus.NewTimer(relayTestActionsSeconds.WithLabelValues("queue"))}: result := <-reschan if result.err != nil { - log.Println("Join from", r.RemoteAddr, "failed:", result.err) + log.Println("Join from", rhost, "failed:", result.err) globalBlocklist.AddError(rhost) relayTestsTotal.WithLabelValues("failed").Inc() http.Error(w, result.err.Error(), http.StatusBadRequest) return } - log.Println("Join from", r.RemoteAddr, "succeeded") + log.Println("Join from", rhost, "succeeded") globalBlocklist.ClearErrors(rhost) relayTestsTotal.WithLabelValues("success").Inc() w.Header().Set("Content-Type", "application/json; charset=utf-8")