-
Notifications
You must be signed in to change notification settings - Fork 347
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
api: Support suppressing the 'x-envoy-' headers added by the HTTP router #2358
Conversation
…uter. Signed-off-by: Lior Okman <lior.okman@sap.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2358 +/- ##
==========================================
- Coverage 64.80% 64.73% -0.08%
==========================================
Files 113 113
Lines 16567 16567
==========================================
- Hits 10737 10725 -12
- Misses 5159 5168 +9
- Partials 671 674 +3 ☔ View full report in Codecov by Sentry. |
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.
This will change both the downstream and upstream behavior. Would it be appropriate to put this in ClientTraffciPolicy?
The relevant Envoy Proxy configuration is this: https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/router/v3/router.proto#extensions-filters-http-router-v3-router . It affects both upstream and downstream. It's not possible to affect just the upstream or just the downstream - Envoy Proxy doesn't give that option. I think that both Do you think there's a better place in the Envoy Gateway configuration to specify this? |
/retest |
Looks like this option only suppresses the headers generated by the router.
And there are many more "x-envoy-xxx" headers generated by other filters, here is the full list: https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/headers So I wonder whether this will work for the use case you mentioned or not.
|
Looking at the list of headers mentioned in the HTTP connection manager documentation:
This only leaves the x-envoy-external-address header. |
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. Defer to other @envoyproxy/gateway-maintainers
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
@zirain @zhaohuabing Can I submit a PR that implements this? |
This's a small changes, you can do the implement here, or you can send another one later. |
What type of PR is this?
This PR enhances the
ClientTrafficPolicy
by adding the following option:What this PR does / why we need it:
This PR adds the ability to suppress the "x-envoy-" headers added by the Envoy HTTP router.
The following headers are affected:
Which issue(s) this PR fixes:
Support for this flag is mentioned in #1846