mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-07 08:44:07 +01:00
Use sprintf
This commit is contained in:
parent
d31ca9c537
commit
3635c0f93f
@ -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"))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user