Skip to content

New Example: Preserve Query Strings on redirect #48

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

brittandeyoung
Copy link

Issue #, if available:

Closes #11
Description of changes:

This PR includes an example and tests for preserving query strings and url when performing a redirect.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Knufle
Copy link

Knufle commented Feb 17, 2025

It would be great to have this merged, thanks!

@kurtextrem
Copy link

For anyone finding this, with the runtime v2, it looks like you can just use the querystring prop as string: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/functions-javascript-runtime-20.html#:~:text=JavaScript%20runtime%202.0.-,Query%20string,-Note (see the Note)

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.

Redirect preserve query string
3 participants