add client ip to agent worker registration (#3675)
This commit is contained in:
@@ -145,6 +145,7 @@ type WorkerRegistration struct {
|
|||||||
Namespace string
|
Namespace string
|
||||||
JobType livekit.JobType
|
JobType livekit.JobType
|
||||||
Permissions *livekit.ParticipantPermission
|
Permissions *livekit.ParticipantPermission
|
||||||
|
ClientIP string
|
||||||
}
|
}
|
||||||
|
|
||||||
func MakeWorkerRegistration() WorkerRegistration {
|
func MakeWorkerRegistration() WorkerRegistration {
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ func (u AgentSocketUpgrader) Upgrade(
|
|||||||
}
|
}
|
||||||
|
|
||||||
registration = agent.MakeWorkerRegistration()
|
registration = agent.MakeWorkerRegistration()
|
||||||
|
registration.ClientIP = GetClientIP(r)
|
||||||
|
|
||||||
// upgrade
|
// upgrade
|
||||||
conn, err := u.Upgrader.Upgrade(w, r, responseHeader)
|
conn, err := u.Upgrader.Upgrade(w, r, responseHeader)
|
||||||
|
|||||||
Reference in New Issue
Block a user