Skip to content

Instantly share code, notes, and snippets.

@trevorbox
Last active December 14, 2023 15:00
Show Gist options
  • Save trevorbox/935327327845de2adc37942f9089cfac to your computer and use it in GitHub Desktop.
Save trevorbox/935327327845de2adc37942f9089cfac to your computer and use it in GitHub Desktop.
Istio EnvoyFilter to increase http header count and maximum header size.
# tested in OSSM v2.1
# see https://github.com/istio/istio/wiki/EnvoyFilter-Samples for example this was based off of
---
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: http-header-count-size-control
spec:
configPatches:
- applyTo: CLUSTER
patch:
operation: MERGE
value:
common_http_protocol_options:
max_headers_count: 200 # default is 100
max_request_headers_kb: 96 # 96 KiB is the maxumum allowed, default is 60 KiB.
- 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"
common_http_protocol_options:
max_headers_count: 200 # default is 100
max_request_headers_kb: 96 # 96 KiB is the maxumum allowed, default is 60 KiB.
...
@j2gg0s
Copy link

j2gg0s commented Dec 14, 2023

common_http_protocol_options -> commonHttpProtocolOptions
max_headers_count -> maxHeadersCount

Example in document maybe wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment