tower-rs / tower-http

HTTP specific Tower utilities.
680 stars 159 forks source link

Do compress grpc-web responses #408

Open bouk opened 1 year ago

bouk commented 1 year ago

Related: https://github.com/tower-rs/tower-http/issues/215

Motivation

grpc-web responses aren't compressed right now, but they should be.

Solution

Add exception for application/grpc-web and change exception filter to use starts_with so we match on any encoding format.

bouk commented 5 months ago

@jplatte can you take a look at this one?

jplatte commented 5 months ago

Is there a piece of documentation or article that you can link to for justification / proof that this is the right thing to do? I'm not really familiar with GRPC.