fix(gateway): preserve query parameters on _redirects#886
Merged
Conversation
f715771 to
9b4b453
Compare
adds missing test + ensures any params from _redirects are preserved this follows what is already supported by Cloudflare Pages implementation: https://developers.cloudflare.com/pages/configuration/redirects/#per-file
9b4b453 to
2d9d254
Compare
lidel
added a commit
to ipfs/specs
that referenced
this pull request
Mar 19, 2025
Related to fix from ipfs/boxo#886
lidel
approved these changes
Mar 19, 2025
Member
There was a problem hiding this comment.
This won't help with Cloudflare-hosted sw gateway, but we should fix the bug where params are not preserved ( we preserve them in all other cases such as subdomain redirects).
- Added support for merging static and dynamic query parameters, prioritizing user values
- Added tests and
- CHANGELOG.md updated
- Opened ipfs/specs#498 to fill the spec gap and clarify how query parameters should be handled.
@SgtPooki in spare time take a look, if specs/tests look fine, I think it is fine to merge this fix (query params should be preserved).
This was referenced Mar 19, 2025
Closed
SgtPooki
commented
Mar 20, 2025
Member
Author
SgtPooki
left a comment
There was a problem hiding this comment.
tests look good to me
lidel
added a commit
to ipfs/specs
that referenced
this pull request
Aug 23, 2025
Related to fix from ipfs/boxo#886
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preserve query parameters for _redirects file redirects
Still needs a test.. and potentially CHANGELOG.md update.
related ipfs/service-worker-gateway#628 + ipfs/specs#498
cc @lidel