Reject ingress if Enabled flag is false (#3293)

This commit is contained in:
Rajiv Gonzalez authored and GitHub committed 2025-01-16 17:19:26 -08:00
1 parent 7f6bd614a0
commit 25fa83926f
1 file changed
+5
+5
View File
@@ -159,6 +159,7 @@ func (s *IngressService) CreateIngressWithUrl(ctx context.Context, urlStr string
ParticipantName: req.ParticipantName,
ParticipantMetadata: req.ParticipantMetadata,
State: &livekit.IngressState{},
Enabled: req.Enabled,
}
switch req.InputType {
@@ -261,6 +262,10 @@ func updateInfoUsingRequest(req *livekit.UpdateIngressRequest, info *livekit.Ing
info.Video = req.Video
}
if req.Enabled != nil {
info.Enabled = req.Enabled
}
if err := ingress.ValidateForSerialization(info); err != nil {
return err
}