Skip to content

Fix duplicated query params being sent to next from apigw v1 events #101

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

Merged
merged 2 commits into from
May 23, 2023

Conversation

edvinerikson
Copy link
Contributor

v1 event contain all params in multiValueQueryStringParameters. Atm there is a bug where all params get duplicated in when sent to next.

eg an input path to the api gw: /?step=1 becomes /step=1&step=1 after we reconstruct the query params from the v1 event. The solution in this PR i to just check the multiValueQueryStringParameters object as that one will be populated even in cases where there isn't any multi-values.

v1 event contain all params in multiValueQueryStringParameters
@changeset-bot
Copy link

changeset-bot bot commented Apr 26, 2023

🦋 Changeset detected

Latest commit: d036071

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
open-next Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Apr 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
open-next ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 23, 2023 3:00am

@edvinerikson edvinerikson changed the title Update event-mapper.ts Fix duplicated query params being sent to next from apigw v1 events May 4, 2023
@seed-deploy seed-deploy bot temporarily deployed to pr101 May 23, 2023 02:59 Inactive
@fwang fwang merged commit c353984 into opennextjs:main May 23, 2023
@fwang
Copy link
Contributor

fwang commented May 23, 2023

Thanks @edvinerikson! Released in v1.3.3

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