mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-27 01:22:18 +00:00
fix(bedrock/base_aws_llm): fix Authorization override guard after header normalization
After lowercasing all header keys, the Authorization override guard was checking for uppercase "Authorization" (always False) and the key lookup would also fail. Update both to use lowercase "authorization" to match the post-normalization dict. Caught by Greptile review on PR #28257.
This commit is contained in:
parent
9c4c27f6d5
commit
1c9af0428a
1 changed files with 2 additions and 4 deletions
|
|
@ -1523,9 +1523,7 @@ class BaseAWSLLM:
|
|||
for header_name, header_value in headers.items():
|
||||
if header_value is not None:
|
||||
request_headers_dict[header_name] = header_value
|
||||
if (
|
||||
headers is not None and "Authorization" in headers
|
||||
): # prevent sigv4 from overwriting the auth header
|
||||
request_headers_dict["Authorization"] = headers["Authorization"]
|
||||
if "authorization" in headers: # prevent sigv4 from overwriting the auth header
|
||||
request_headers_dict["Authorization"] = headers["authorization"]
|
||||
|
||||
return request_headers_dict, request.body
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue