mirror of
https://github.com/livekit/livekit.git
synced 2026-08-28 11:44:43 +00:00
Path check helpers (#4392)
* Path check helpers * remove trailing slash
This commit is contained in:
@@ -358,3 +358,15 @@ func ValidateConnectRequest(
|
||||
res.grants = claims
|
||||
return res, http.StatusOK, nil
|
||||
}
|
||||
|
||||
func IsRTCPath(path string) bool {
|
||||
return path == "/rtc" || path == "/rtc/v1"
|
||||
}
|
||||
|
||||
func IsRTCValidatePath(path string) bool {
|
||||
return path == "/rtc/validate" || path == "/rtc/v1/validate"
|
||||
}
|
||||
|
||||
func IsAgentPath(path string) bool {
|
||||
return strings.HasPrefix(path, "/agent")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user