-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
rewrite: uri query
replace operation
#6165
rewrite: uri query
replace operation
#6165
Conversation
@francislavoie let me know if you would like to see other test cases to make sure this is working as intended. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional test cases we should have:
- Placeholders (key, search, replacement)
- Partial replacement (only replace a subset of the existing value)
- Ensure nothing is replaced if the search is not found
- Caddyfile adapt test (to ensure it produces the expected JSON), just make a Caddyfile with as many config combinations as you can think of, don't need to be functional, just coverage for the adapter
uri query
replace operation
9caedc6
to
7f013d7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint error is unrelated, not sure why it is showing up here, but this feature LGTM!! Beautiful. Nice work @armadi1809
Thanks! Most of the scenarios mentioned by @francislavoie above should now be covered. The only one I am not sure about is using placeholders for the search, since we are now using regexes. It looks like neither the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we merge this in for now, and then address that in a follow-up PR? Great work, @armadi1809 !
I will wait for @francislavoie 's final approval.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
3849db9
to
fee1989
Compare
Yeah this is cool. 😎 |
Since this PR was merged, caddy no longer starts and segfaults. Built on Go 1.22.1.
Should I open an issue? |
@mholt @francislavoie I just submitted a PR that fixes the issue mentioned in the comment above. I when calling the |
Thank you @armadi1809 :) |
This PR is a followup to close #6096. It implements the replace operation for query strings.