Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Do not try to split ip and port of x-forwarded-for addresses

Gabe Kangasa1ad11e6efe4
diff --git a/utils/clientId.go b/utils/clientId.go
index 34b5d6503a..86ad7e45f6 100644
--- a/utils/clientId.go
+++ b/utils/clientId.go
@@ -28,7 +28,7 @@ func GetIPAddressFromRequest(req *http.Request) string {
ipAddressString := req.RemoteAddr
xForwardedFor := req.Header.Get("X-FORWARDED-FOR")
if xForwardedFor != "" {
- ipAddressString = xForwardedFor
+ return xForwardedFor
}
ip, _, err := net.SplitHostPort(ipAddressString)