Istio converts the headers’s case to lower case. But we wanted to preserve the case.
We use Istio 1.9
I am trying the following envoyfilter from:
kind: EnvoyFilter
metadata:
name: header-casing
spec:
configPatches:
- applyTo: CLUSTER
match:
cluster:
context: SIDECAR_INBOUND
patch:
operation: MERGE
value:
typed_extension_protocol_options:
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
'@type': type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
use_downstream_protocol_config:
http_protocol_options:
header_key_format:
stateful_formatter:
name: preserve_case
typed_config:
'@type': type.googleapis.com/envoy.extensions.http.header_formatters.preserve_case.v3.PreserveCaseFormatterConfig
- applyTo: NETWORK_FILTER
match:
listener:
filterChain:
filter:
name: envoy.filters.network.http_connection_manager
patch:
operation: MERGE
value:
typed_config:
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
http_protocol_options:
header_key_format:
stateful_formatter:
name: preserve_case
typed_config:
'@type': type.googleapis.com/envoy.extensions.http.header_formatters.preserve_case.v3.PreserveCaseFormatterConfig
I get this error:
The EnvoyFilter “header-casing” is invalid: spec.configPatches.match.cluster: Invalid value: “null”: spec.configPatches.match.cluster in body must be of type object: “null”
Any help on this would be appreciated