ijpiantanida / talkback

A simple HTTP proxy that records and playbacks requests
MIT License
283 stars 41 forks source link

Add support for brotli #69

Closed sarayourfriend closed 2 years ago

sarayourfriend commented 2 years ago

Adds support for compressing and decompressing brotli. Node's zlib module has had support for brotli compression and decompression since v10.6: https://nodejs.org/api/zlib.html#class-zlibbrotlicompress

We've been using (and enjoying) talkback over in https://github.com/wordpress/openverse-frontend and I ran into this recently with our upstream server being fronted by cloudflare which is using brotli compression.

ijpiantanida commented 2 years ago

Hey @sarayourfriend, thank you for this, it's great. Just added a minor comment.

I've been thinking about dropping support for node v10, and requiring >= 12, so this will definitely be supported.

sarayourfriend commented 2 years ago

I've been thinking about dropping support for node v10, and requiring >= 12, so this will definitely be supported.

Makes sense! 10 is far outside of LTS at this point, even 12 is about to leave maintenance next month.

ijpiantanida commented 2 years ago

Thank you @sarayourfriend, I just released v3.0.1 with this change