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

feat: append query string when using redirect with regex_uri #4229

Closed
Gary-Airwallex opened this issue May 12, 2021 · 3 comments · Fixed by #4298
Closed

feat: append query string when using redirect with regex_uri #4229

Gary-Airwallex opened this issue May 12, 2021 · 3 comments · Fixed by #4298
Labels
enhancement New feature or request

Comments

@Gary-Airwallex
Copy link
Contributor

Proposed changes

#4152 supports redirect with regex, but 1. it does not append the query string from original request to the Location header, and 2. it does not encode url. I suggest fxing these as in proxy-rewrite. If everyone agrees on this I'll create a PR for the change.

Concerns

Proposed changes do change the behavior of current implementation, and it will cause problems if

  1. someone expects the query string to be removed, or
  2. someone encodes url manually in plugin configuration, e.g. "regex_uri": ["/abc(.*)", "/ab%20c$1"],
@Firstsawyou
Copy link
Contributor

I think this is a very good feature. For concerns, we can use a switch to decide whether to enable this feature.
@spacewander What do you think?

@spacewander
Copy link
Member

Yes, we can add two options for them. We can create two PRs, each for a new feature.

@spacewander
Copy link
Member

@Gary-Airwallex
Will you submit a PR for the first part? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants