Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix double cookie header for Lambda Function URL requests #586

Merged
merged 3 commits into from
Jan 13, 2023

Conversation

bnusunny
Copy link
Contributor

@bnusunny bnusunny commented Jan 12, 2023

Issue #, if available:

awslabs/aws-lambda-web-adapter/issues/121

Lambda Function URL requests include cookie in both cookies and headers.cookie objects. This causes lambda-http to duplicate cookie headers in the requests.

Description of changes:

Replace headers.append() withheaders.insert(). This fixes the issue.

By submitting this pull request

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I confirm that I've made a best effort attempt to update all relevant documentation.

@bnusunny bnusunny requested a review from calavera January 12, 2023 12:09
@bnusunny bnusunny merged commit 17df82f into main Jan 13, 2023
@bnusunny bnusunny deleted the fix_double_cookie_in_request branch January 13, 2023 00:32
THOUSAND-SKY added a commit to THOUSAND-SKY/remix-aws that referenced this pull request Jan 7, 2024
Function URLs get cookies twice, in headers and the `cookies` array, which was causing them to duplicate.

Ref: awslabs/aws-lambda-rust-runtime#586
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants