api: adjust the behavior of header's present_match#16627
api: adjust the behavior of header's present_match#16627mattklein123 merged 4 commits intoenvoyproxy:mainfrom
Conversation
Currently, envoy ignores the value of present match. This commit adjust envoy's behavior. When the value is True, envoy will check the header present. When the value is False, envoy will check the header absent. Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
htuch
left a comment
There was a problem hiding this comment.
Looks good, thanks for the fix! A few minor comments.
/wait
| // If specified, header match will be performed based on whether the header is in the | ||
| // request. | ||
| // If specified as true, header match will be performed based on whether the header is in the | ||
| // request. If specified as false, header match will be performed based on whether the header is absent. |
There was a problem hiding this comment.
I think this is technically a data plane behavioral change. That said, I don't see any sensible way that this field could have been configured with false and a meaningful match expected previously, so I don't think we need runtime protection.
There was a problem hiding this comment.
the doc is not correct, config present_match: false will not effected, shoud use
present_match: true
invert_match:true
There was a problem hiding this comment.
@hanjm I tested it on the main branch, it works as expected. I pasted the detail at #17345 (comment)
There was a problem hiding this comment.
sorry, my version(1.17) is too low. Thanks you reply.
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
|
@htuch thanks for the review, addressed your comment. |
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Currently, envoy ignores the value of present match. This commit adjust envoy's behavior. When the value is True, envoy will check the header present. When the value is False, envoy will check the header absent. Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Commit Message: api: adjust the behavior of header's present_match
Additional Description:
Currently, envoy ignores the value of present match. This commit adjust
envoy's behavior. When the value is True, envoy will check the header
present. When the value is False, envoy will check the header absent.
Risk Level: low
Testing: unit test added
Docs Changes: api doc updated
Release Notes: minor behavior change
Fixes #14656
Signed-off-by: He Jie Xu hejie.xu@intel.com