Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create a EnvoyFilter file (e.g. envoyfilter-case.yaml)

    Code Block
    apiVersion: networking.istio.io/v1alpha3
    kind: EnvoyFilter
    metadata:
      name: header-casing
      namespace: istio-confiigconfig
    spec:
      configPatches:
      - applyTo: CLUSTER
        match:
          context: ANY
        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
    
    


  2. Apply the change to Istio

    Code Block
    $ kubectl apply -f envoyfilter-case.yaml


...