[MCP Gateway] Added route check for internal users (#13350)

* added route check

* fix ruff
This commit is contained in:
Jugal D. Bhatt 2025-08-06 15:32:21 -07:00 committed by GitHub
parent c3cc10387e
commit b7325f4765
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -210,7 +210,7 @@ class RouteChecks:
route=route, allowed_routes=LiteLLMRoutes.self_managed_routes.value
): # routes that manage their own allowed/disallowed logic
pass
elif route.startswith("/v1/mcp/"):
elif route.startswith("/v1/mcp/") or route.startswith("/mcp-rest/"):
pass # authN/authZ handled by api itself
else:
user_role = "unknown"