From b94c982ec96b424b280c3a2de291bc857e920898 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Tue, 13 Aug 2024 15:41:01 -0700 Subject: [PATCH] use _check_valid_ip --- litellm/proxy/auth/user_api_key_auth.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/litellm/proxy/auth/user_api_key_auth.py b/litellm/proxy/auth/user_api_key_auth.py index 2e74d31106..5df9674172 100644 --- a/litellm/proxy/auth/user_api_key_auth.py +++ b/litellm/proxy/auth/user_api_key_auth.py @@ -1225,8 +1225,6 @@ def _check_valid_ip( client_ip = request.headers["x-forwarded-for"] elif request.client is not None: client_ip = request.client.host - else: - client_ip = None # Check if IP address is allowed if client_ip not in allowed_ips: