gRPC: Add support to control envoy generated headers #34179
Merged
CI (Envoy) / Mobile/iOS tests
skipped
Jun 27, 2024 in 0s
Check was skipped
This check was not triggered in this CI run
Details
Request (pr/34179/main@f40b5a3)
@tyxia
f40b5a3
#34179
merge
main@f0201e5
gRPC: Add support to control envoy generated headers
This PR provides gRPC client level control over Envoy generated headers. It currently controls
x-envoy-internal
andx-forwarded-for
(can be expanded if needed)
- If true, header will be added. But it can be overridden by setting
setSendInternal
orsetSendXff
to false in
Http::AsyncClient::StreamOptions
, as per stream control.- If false, header will be removed and can not be overridden by per stream option.
This logic is designed in this way because:
- Preserve backwards compatible behavior:
- Both headers are still sent by default
- If any existing users remove them with
StreamOptions
, headers are still removed- Still provide the per stream override control
- Override here implicitly means
setting to false
as their default value inAsyncClient::StreamOptions
is true.- Thus, per stream override is still available, just in one-way direction: disable on per stream basis
- The only thing is that now user can not set
StreamOptions
to true if they are disabled in config. But it should be fine because:
- For existing user, no one should set them to true in
StreamOptions
as they are already default to true.- For future user, per stream control can still be achieved as stated above.
Environment
Request variables
Key | Value |
---|---|
ref | 53bf255 |
sha | f40b5a3 |
pr | 34179 |
base-sha | f0201e5 |
actor | |
message | gRPC: Add support to control envoy generated headers... |
started | 1719461997.814156 |
target-branch | main |
trusted | false |
Build image
Container image/s (as used in this CI run)
Key | Value |
---|---|
default | envoyproxy/envoy-build-ubuntu:f94a38f62220a2b017878b790b6ea98a0f6c5f9c |
mobile | envoyproxy/envoy-build-ubuntu:mobile-f94a38f62220a2b017878b790b6ea98a0f6c5f9c |
Version
Envoy version (as used in this CI run)
Key | Value |
---|---|
major | 1 |
minor | 31 |
patch | 0 |
dev | true |
Loading