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(lambda-edge-adapter): Support Alternate Domain Names and Multiple Cookies in Lambda@Edge #3858

Merged
merged 3 commits into from
Jan 31, 2025

Conversation

kentkwee
Copy link
Contributor

This pull request introduces support for using alternate domain names in front of a CloudFront distribution. Additionally, it enhances cookie handling by supporting the setting of multiple cookies, addressing the previous limitation where only the last cookie was set.

The author should do the following, if applicable

  • Add tests
  • Run tests
  • bun run format:fix && bun run lint:fix to format the code

Kent added 2 commits January 26, 2025 21:15
Previously, only the CloudFront distribution name was used. Now, the Host header value is utilized for more accurate detection.
Previously, only the last Set-Cookie header was returned. This update ensures all Set-Cookie headers are processed and returned as expected.
@yusukebe
Copy link
Member

Thanks @kentkwee ! The CI is falling. Can you take a look?

Hey @watany-dev Can you review this?

@kentkwee
Copy link
Contributor Author

Sorry for the oversight. Wasn't aware that bun run test wasn't sufficient.
I have added a fallback mechanism for unusual event data without host headers.

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.33%. Comparing base (d40fffb) to head (9c625e4).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3858      +/-   ##
==========================================
+ Coverage   91.32%   91.33%   +0.01%     
==========================================
  Files         161      162       +1     
  Lines       10242    10263      +21     
  Branches     2889     2941      +52     
==========================================
+ Hits         9353     9374      +21     
  Misses        888      888              
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

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

LGTM!

@yusukebe
Copy link
Member

Hi @kentkwee ! Looks good to me. I'll merge it now. Thank you!

@yusukebe yusukebe merged commit a1ae224 into honojs:main Jan 31, 2025
16 checks passed
@watany-dev
Copy link
Contributor

@kentkwee @yusukebe
Sorry I didn't take the time to move it. I don't see anything wrong with the idea, so I think it's fine.

@yusukebe
Copy link
Member

@watany-dev

No problem. Thank you for reviewing!

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.

3 participants