mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
fix(user_api_key_auth.py): fix client_ip
This commit is contained in:
parent
cf1a1605a6
commit
b26f717c70
1 changed files with 2 additions and 0 deletions
|
@ -1275,6 +1275,8 @@ def _get_request_ip_address(
|
||||||
client_ip = request.headers["x-forwarded-for"]
|
client_ip = request.headers["x-forwarded-for"]
|
||||||
elif request.client is not None:
|
elif request.client is not None:
|
||||||
client_ip = request.client.host
|
client_ip = request.client.host
|
||||||
|
else:
|
||||||
|
client_ip = ""
|
||||||
|
|
||||||
return client_ip
|
return client_ip
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue