From 3635c0f93fd162982273f240fed54f017702f409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Papp?= Date: Wed, 6 Nov 2024 14:38:13 +0100 Subject: [PATCH] Use sprintf --- relay/server/listener/ws/listener.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relay/server/listener/ws/listener.go b/relay/server/listener/ws/listener.go index f2df4d1b9..1ad57d27a 100644 --- a/relay/server/listener/ws/listener.go +++ b/relay/server/listener/ws/listener.go @@ -96,5 +96,5 @@ func remoteAddr(r *http.Request) string { if r.Header.Get("X-Real-Ip") == "" || r.Header.Get("X-Real-Port") == "" { return r.RemoteAddr } - return r.Header.Get("X-Real-Ip") + ":" + r.Header.Get("X-Real-Port") + return fmt.Sprintf("%s:%s", r.Header.Get("X-Real-Ip"), r.Header.Get("X-Real-Port")) }