I'm struggling to preserve proper_case in headers (1.19)

299 views
Skip to first unread message

Adam Davis

unread,
Aug 24, 2021, 4:33:25 PM8/24/21
to envoy-users
I have a service widely used, and after fronting with envoy I had a few clients complain that the header cases changes (default in envoy is lowercase, RFC says it shouldn't matter, but I'm not trying to cause extra work for anyone)

For the life of me I can't get proper_case_words to work. 

When I curl my service, the header is Subject-Token, from envoy it's subject-token.


Is what i'm trying to use, but figuring out how to stuff it into envoy config is beyond my current grasp.

I've tried the following with no luck. Any tips on keeping proper_case headers:

  clusters:
  - name: default
    typed_extension_protocol_options:
      envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
        explicit_http_config:
          http_protocol_options: 
            header_key_format:
              proper_case_words: {}
    connect_timeout: 15.0s
    type: STRICT_DNS
    lb_policy: ROUND_ROBIN
    load_assignment:
      cluster_name: default
      endpoints:
        - lb_endpoints:
            - endpoint:
                address:
                  socket_address:
                    address: authentication-service
                    port_value: 8087

Adam Davis

unread,
Aug 24, 2021, 5:11:01 PM8/24/21
to envoy-users
of course, I fight with this for a full day and then immediately after sending this I get it figured out :)

Instead of having it on the cluster, per this page it is needed on the listener itself 

This is what got this working:

static_resources:
  listeners:
  - name: listener_0
    address:
      socket_address: { address: 0.0.0.0, port_value: 10000 }
    filter_chains:
    - filters:
      - name: envoy.filters.network.http_connection_manager
        typed_config:
          stat_prefix: ingress_http
          http_protocol_options: 
            header_key_format:
              proper_case_words: {}
          codec_type: AUTO
          route_config:
             [..] all of my routes

Reply all
Reply to author
Forward
0 new messages