Merge remote-tracking branch 'origin/master' into raja_async_attributes

This commit is contained in:
boks1971
2026-05-26 23:28:00 +05:30
2 changed files with 7 additions and 0 deletions
+3
View File
@@ -254,6 +254,9 @@ func (s *RTCService) validateInternal(
} else {
lgr.Debugw("processing join request", "joinRequest", logger.Proto(joinRequest))
if joinRequest.ClientInfo == nil {
joinRequest.ClientInfo = &livekit.ClientInfo{}
}
AugmentClientInfo(joinRequest.ClientInfo, r)
pi.Client = joinRequest.ClientInfo
+4
View File
@@ -246,6 +246,10 @@ func getUserAgentParser() *uaparser.Parser {
}
func AugmentClientInfo(ci *livekit.ClientInfo, req *http.Request) {
if ci == nil {
return
}
// get real address (forwarded http header) - check Cloudflare headers first, fall back to X-Forwarded-For
ci.Address = GetClientIP(req)