Skip to content

Instantly share code, notes, and snippets.

@Spazzy757
Created February 15, 2021 12:56
Show Gist options
  • Save Spazzy757/140497a22bb4738a3292eff480ccf505 to your computer and use it in GitHub Desktop.
Save Spazzy757/140497a22bb4738a3292eff480ccf505 to your computer and use it in GitHub Desktop.
GZIP compressor Envoy Proxy Filter
---
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: gzip
spec:
workloadSelector:
labels:
# Put same labels that will identify your application
app: <app-name>
configPatches:
- applyTo: HTTP_FILTER
match:
context: SIDECAR_INBOUND
listener:
filterChain:
filter:
name: envoy.http_connection_manager
subFilter:
name: envoy.router
patch:
operation: INSERT_BEFORE
value:
name: envoy.filters.http.compressor
typed_config:
# See https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/compressor_filter for full options
'@type': type.googleapis.com/envoy.extensions.filters.http.compressor.v3.Compressor
compressor_library:
name: text_optimized
typed_config:
'@type': type.googleapis.com/envoy.extensions.compression.gzip.compressor.v3.Gzip
remove_accept_encoding_header: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment