mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
feat - allow user to define public routes
This commit is contained in:
parent
123477b55a
commit
2f90759db5
1 changed files with 3 additions and 1 deletions
|
@ -137,7 +137,9 @@ async def user_api_key_auth(
|
||||||
"""
|
"""
|
||||||
route: str = request.url.path
|
route: str = request.url.path
|
||||||
|
|
||||||
if route in LiteLLMRoutes.public_routes.value:
|
if route in LiteLLMRoutes.public_routes.value or route in general_settings.get(
|
||||||
|
"public_routes", []
|
||||||
|
):
|
||||||
# check if public endpoint
|
# check if public endpoint
|
||||||
return UserAPIKeyAuth(user_role=LitellmUserRoles.INTERNAL_USER_VIEW_ONLY)
|
return UserAPIKeyAuth(user_role=LitellmUserRoles.INTERNAL_USER_VIEW_ONLY)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue