forked from phoenix/litellm-mirror
(fix) make sure route is str
This commit is contained in:
parent
5ebb1b4447
commit
1f7c8e86a7
1 changed files with 7 additions and 2 deletions
|
@ -652,8 +652,13 @@ async def user_api_key_auth(
|
||||||
"/user",
|
"/user",
|
||||||
]
|
]
|
||||||
# check if the current route startswith any of the allowed routes
|
# check if the current route startswith any of the allowed routes
|
||||||
if any(
|
if (
|
||||||
route.startswith(allowed_route) for allowed_route in allowed_routes
|
route is not None
|
||||||
|
and isinstance(route, str)
|
||||||
|
and any(
|
||||||
|
route.startswith(allowed_route)
|
||||||
|
for allowed_route in allowed_routes
|
||||||
|
)
|
||||||
):
|
):
|
||||||
# Do something if the current route starts with any of the allowed routes
|
# Do something if the current route starts with any of the allowed routes
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue