8000 fix(aws-lambda): aws-lambda-streaming set-cookie headers by mckamyk Β· Pull Request #3236 Β· nitrojs/nitro Β· GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(aws-lambda): aws-lambda-streaming set-cookie headers #3236

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 te 8000 rms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 24, 2025

Conversation

mckamyk
Copy link
Contributor
@mckamyk mckamyk commented Mar 20, 2025

πŸ”— Linked issue

#3228

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

The aws-lambda preset with awsLamba.streaming option in nitro.config.js used a different handler from aws-lambda without streaming enabled. This other handler stripped cookies from the response headers, and did not add them back like the non-streaming handler did.

This PR fixes that behavior, such that aws-lambda-streaming builds will properly set cookies, which is very important for web frameworks like SolidStart and Tanstack Start who use nitro to support authentication in stream-enabled lambdas.

Resolves #3228

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@mckamyk mckamyk requested a review from pi0 as a code owner March 20, 2025 18:39
@mckamyk
Copy link
Contributor Author
mckamyk commented Mar 20, 2025

Note that I can also create a PR into v3 as well, as it also seems affected.

@mckamyk mckamyk changed the title fix: aws-lambda-streaming set-cookie headers fix(aws-lambda): aws-lambda-streaming set-cookie headers Mar 20, 2025
@pi0
Copy link
Member
pi0 commented Mar 20, 2025

Thank you for PR. Have you end-to-end tested the changes?

@mckamyk
Copy link
Contributor Author
mckamyk commented Mar 20, 2025

I did manually test a deployed lambda with streaming enabled got the set cookie header.

I did not run any tests in the codebase.

@mckamyk
Copy link
Contributor Author
mckamyk commented Mar 20, 2025

I can post an example URL when I get back home later tonight

@mckamyk
Copy link
Contributor Author
mckamyk commented Mar 21, 2025

Updated a bit, and here's a cloudfront url to demonstrate.

https://d16y4tlk92zj8t.cloudfront.net/

Copy link
Member
@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@pi0 pi0 merged commit 305f7e1 into nitrojs:v2 Mar 24, 2025
4 checks passed
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
0