Skip to content

Commit

Permalink
convert kebab-case from header names to snake_case context names
Browse files Browse the repository at this point in the history
  • Loading branch information
sigpwned committed Jan 25, 2024
1 parent f4b8f05 commit a957dc8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def lambda_handler(request, context):
for header_name in copy_request_headers:
header_value = find_first_header_value(request, header_name)
if header_value is not None:
context[header_name] = header_value
context_name = header_name.replace("-", "_")
context[context_name] = header_value

return {
"principalId": principal_id,
Expand Down

0 comments on commit a957dc8

Please sign in to comment.