Populate network field when set by clients (#919)

This commit is contained in:
David Zhao
2022-08-15 23:28:15 -07:00
committed by GitHub
parent 6b48fbc577
commit 1d199d1efa
5 changed files with 6 additions and 5 deletions
+1
View File
@@ -299,6 +299,7 @@ func (s *RTCService) ParseClientInfo(r *http.Request) *livekit.ClientInfo {
ci.Browser = values.Get("browser")
ci.BrowserVersion = values.Get("browser_version")
ci.DeviceModel = values.Get("device_model")
ci.Network = values.Get("network")
// get real address (forwarded http header) - check Cloudflare headers first, fall back to X-Forwarded-For
ci.Address = r.Header.Get("CF-Connecting-IP")
if len(ci.Address) == 0 {