Path check helpers (#4392)

* Path check helpers

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