Path check helpers (#4392)

* Path check helpers

* remove trailing slash
This commit is contained in:
Raja Subramanian
2026-03-25 10:53:07 +05:30
committed by GitHub
parent 1f1eeb6832
commit 9055a34981
+12
View File
@@ -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")
}