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

Consistent QueryStrings on redirect (fixes #3430) #3431

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xavivars
Copy link
Contributor

@xavivars xavivars commented Mar 3, 2025

No description provided.

@@ -149,6 +149,8 @@ func getLocation(ctx filters.FilterContext, location *url.URL, typ redirectType)

if u.RawQuery == "" {
u.RawQuery = r.URL.RawQuery
} else {
u.RawQuery = r.URL.RawQuery + "&" + u.RawQuery
Copy link
Member

Choose a reason for hiding this comment

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

Please see the issue comment.
I think we need to have a separate input if you need this behavior, because we do not know how many users could have critical redirects that expect the current behavior.
I think the current behavior is correct.

We could have a 3rd optional parameter to mix the input query and configured query, see also doc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I had read the docs, but they say nothing about query (I actually thought when reading the docs they were dropping whatever query was coming from the original request)

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