Protect against nil clientInfo (#4546)

This commit is contained in:
Raja Subramanian authored and GitHub committed 2026-05-26 20:32:11 +05:30
1 parent 145689e627
commit dd7580b454
1 file changed
+4
+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)