-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
http: added a new dual header mutation filter that could be used as downstream/upstream filter #25658
Conversation
Signed-off-by: wbpcode <[email protected]>
Signed-off-by: wbpcode <[email protected]>
Signed-off-by: wbpcode <[email protected]>
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
cc @alyssawilk here is the pr for #24100. This PR is consist of three commits. The first commit added a new |
Signed-off-by: wbpcode <[email protected]>
Signed-off-by: wbpcode <[email protected]>
/assign-from @envoyproxy/api-shepherds |
@envoyproxy/api-shepherds assignee is @htuch |
api/envoy/extensions/filters/http/header_mutation/v3/header_mutation.proto
Outdated
Show resolved
Hide resolved
api/envoy/extensions/filters/http/header_mutation/v3/header_mutation.proto
Outdated
Show resolved
Hide resolved
Signed-off-by: wbpcode <[email protected]>
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.
Looks good at API / design level! Some minor docs nits and a couple of Qs.
docs/root/configuration/http/http_filters/header_mutation_filter.rst
Outdated
Show resolved
Hide resolved
docs/root/configuration/http/http_filters/header_mutation_filter.rst
Outdated
Show resolved
Hide resolved
docs/root/configuration/http/http_filters/header_mutation_filter.rst
Outdated
Show resolved
Hide resolved
api/envoy/extensions/filters/http/header_mutation/v3/header_mutation.proto
Outdated
Show resolved
Hide resolved
Co-authored-by: htuch <[email protected]> Signed-off-by: code <[email protected]>
…er.rst Co-authored-by: htuch <[email protected]> Signed-off-by: code <[email protected]>
…er.rst Co-authored-by: htuch <[email protected]> Signed-off-by: code <[email protected]>
…eader-mutation-filter
Signed-off-by: wbpcode <[email protected]>
Signed-off-by: wbpcode <[email protected]>
Signed-off-by: wbpcode <[email protected]>
…eader-mutation-filter
and used as downstream or upstream HTTP filter. The filter can be configured to apply the header mutations to the request, response, or both. | ||
|
||
|
||
In most cases, this filter would be a more flexible alternative to the ``request_headers_to_add``, ``request_headers_to_remove``, |
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.
Is it fair to say this alternative use would sometimes also be done via composite filter?
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 do you mean by the composite filter
here? The envoy.filters.http.composite
filter or multiple header mutation filters?
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.
envoy.filters.http.composite
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.
I think the answer is yes. The compositer filter could provides very flexible matching. Although for most users, route level configuration is flexible enough.
source/extensions/filters/http/header_mutation/header_mutation.cc
Outdated
Show resolved
Hide resolved
Signed-off-by: wbpcode <[email protected]>
Signed-off-by: wbpcode <[email protected]>
Signed-off-by: wbpcode <[email protected]>
Signed-off-by: wbpcode <[email protected]>
test/extensions/filters/http/header_mutation/header_mutation_integration_test.cc
Outdated
Show resolved
Hide resolved
test/extensions/filters/http/header_mutation/header_mutation_integration_test.cc
Show resolved
Hide resolved
Signed-off-by: wbpcode <[email protected]>
api/envoy/extensions/filters/http/header_mutation/v3/header_mutation.proto
Outdated
Show resolved
Hide resolved
test/extensions/http/early_header_mutation/header_mutation/header_mutation_test.cc
Show resolved
Hide resolved
/coverage |
Coverage for this Pull Request will be rendered here: https://storage.googleapis.com/envoy-pr/25658/coverage/index.html The coverage results are (re-)rendered each time the CI |
LGTM modulo comment, thanks, this is really nice. |
…tation.proto Co-authored-by: htuch <[email protected]> Signed-off-by: code <[email protected]>
Signed-off-by: wbpcode <[email protected]>
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.
LGTM, thanks!
Commit Message: http: added a new dual header mutation filter that could be used as downstream/upstream filter
Additional Description:
Check #24100 for more detailed context.
Risk Level: low. new L7 extension.
Testing: unit.
Docs Changes: added.
Release Notes: added.
Platform Specific Features: n/a.