mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-06 16:24:46 +00:00
Fix API Key Being Logged (#12978)
* AIF-262 Fix for keys being logged * AIF-262 Undid http exception detail removal * AIF-262 Converted f-string to normal
This commit is contained in:
@@ -579,7 +579,7 @@ async def _user_api_key_auth_builder( # noqa: PLR0915
|
||||
elif api_key == "":
|
||||
# missing 'Bearer ' prefix
|
||||
raise Exception(
|
||||
f"Malformed API Key passed in. Ensure Key has `Bearer ` prefix. Passed in: {passed_in_key}"
|
||||
"Malformed API Key passed in. Ensure Key has `Bearer ` prefix."
|
||||
)
|
||||
|
||||
if route == "/user/auth":
|
||||
@@ -1237,7 +1237,7 @@ def get_api_key_from_custom_header(
|
||||
api_key = _get_bearer_token(api_key=custom_api_key)
|
||||
verbose_proxy_logger.debug(
|
||||
"Found custom API key using header: {}, setting api_key={}".format(
|
||||
custom_litellm_key_header_name, api_key
|
||||
custom_litellm_key_header_name, abbreviate_api_key(api_key)
|
||||
)
|
||||
)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user