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

gateway api: fix rewrite #54939

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

Conversation

howardjohn
Copy link
Member

@howardjohn howardjohn commented Jan 31, 2025

fixes #54920

Please provide a description of this PR:

@istio-testing
Copy link
Collaborator

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@istio-testing istio-testing added do-not-merge/work-in-progress Block merging of a PR because it isn't ready yet. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 31, 2025
@howardjohn howardjohn force-pushed the gtw/prefix-match-fix branch from abf4a6b to 854b081 Compare January 31, 2025 19:58
rewrite.Uri = strings.TrimSuffix(*filter.Path.ReplacePrefixMatch, "/")
if rewrite.Uri == "" {
// `/` means removing the prefix
rewrite.Uri = "/"
} else if prefixMatchAll {
rewrite.UriRegexRewrite = &istio.RegexRewrite{
Copy link
Contributor

Choose a reason for hiding this comment

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

So we're using regex matching over standard matching to get around envoy?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep. I don't love it -- we can see about getting afix into envoy itself

@howardjohn
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Block merging of a PR because it isn't ready yet. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTPRoute: unable to add path prefix via URLRewrite
3 participants