Add path_matcher + prefix_rewrite validation#23160
Merged
adisuissa merged 270 commits intoenvoyproxy:mainfrom Sep 19, 2022
Merged
Add path_matcher + prefix_rewrite validation#23160adisuissa merged 270 commits intoenvoyproxy:mainfrom
adisuissa merged 270 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
…er-filter-matching-lib-control-plane # Conflicts: # envoy/router/BUILD # source/extensions/extensions_build_config.bzl # source/extensions/extensions_metadata.yaml # tools/extensions/extensions_schema.yaml Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
…ite-extention-lib Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
…ter-filter-matching-lib-control-plane Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: Ryan Northey <ryan@synca.io> Signed-off-by: silverstar195 <seanmaloney@google.com> # Conflicts: # api/envoy/config/route/v3/route_components.proto
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
…g-lib-control-plane Signed-off-by: silverstar195 <seanmaloney@google.com>
…g-lib-control-plane Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
…-fuzzing Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Signed-off-by: silverstar195 <seanmaloney@google.com>
Contributor
Author
|
/assign adisuissa |
1 similar comment
Contributor
Author
|
/assign adisuissa |
tyxia
reviewed
Sep 21, 2022
| "Specify only one of prefix_rewrite, regex_rewrite or path_rewrite_policy"); | ||
| } | ||
|
|
||
| if (!route.route().prefix_rewrite().empty() && path_matcher_ != nullptr) { |
Member
There was a problem hiding this comment.
nit: We should be able to directly use prefix_rewrite_ that has already been initialized, right? This avoids redundant function call to route() and prefix_rewrite().
We can even merge this into the if block in line 659. But I think merging will be a bit micro-optimization and keep the separate two checks here helps readability.
Changing to prefix_rewrite_ is good enough IMO.
Member
|
/assign @tyxia |
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.
Commit Message:
Add path_matcher + prefix_rewrite validation
Additional Description:
You should not be able to perform a prefix_rewrite when matching with a path_matcher.
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]