CompressorPerRoute support for Request overrides

51 views
Skip to first unread message

David Vilaverde

unread,
Mar 1, 2025, 10:36:41 AMMar 1
to envoy-users
I was hoping to use CompressorPerRoute to enable disable compression at a specific route as is done for response compression, but can't find any way to do this.

My filter is configured as such:
       http_filters:
          - name: envoy.filters.http.compressor
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.filters.http.compressor.v3.Compressor
              response_direction_config:
                common_config:
                  min_content_length: 100
              request_direction_config:
                common_config:
                  enabled:
                    default_value: false
                    runtime_key: request_compressor_enabled

But once I turn on request compression I can't turn it off in the route using something like this:

typed_per_filter_config:
  envoy.filters.http.compression:
    "@type": type.googleapis.com/envoy.extensions.filters.http.compressor.v3.CompressorPerRoute
    disabled: true

And if I leave it disabled in the filter, then I can't enable it in the CompressorPerRoute override.

Are there any ways around this? I don't understand why this limitation.

Thanks

Yan Avlasov

unread,
Mar 5, 2025, 9:44:14 PMMar 5
to David Vilaverde, envoy-users
This should be working. Please open an Issue on GitHub with your configuration that reproduces the behavior.

--
You received this message because you are subscribed to the Google Groups "envoy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to envoy-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/envoy-users/374ea285-8105-440b-a1e9-ed1e1657ebd6n%40googlegroups.com.

David Vilaverde

unread,
Mar 7, 2025, 12:14:55 PMMar 7
to envoy-users
Thanks for you reply Yan. 

Are you suggesting that enabling request compression on the request using envoy.extensions.filters.http.compressor.v3.CompressorPerRoute on the route should work? 

How would that possible if CompressorPerRoute does not have a `request_direction_config` property? I just want to make sure we are both talking about enabling compression in the request direction. 

I've already verified that using CompressorPerRoute in a route to enable compression on the response direction works correctly.

David

Yan Avlasov

unread,
Mar 10, 2025, 11:05:11 AMMar 10
to David Vilaverde, envoy-users
I misunderstood. Please file an enhancement request.

Reply all
Reply to author
Forward
0 new messages