dougmoscrop / serverless-http

Use your existing middleware framework (e.g. Express, Koa) in AWS Lambda 🎉
Other
1.72k stars 166 forks source link

Add brotli in binary encoding #105

Closed kamleshchandnani closed 5 years ago

kamleshchandnani commented 5 years ago

Right now aws provider just supports gzip and deflate in BINARY_ENCODINGS here. So if I compress my resources using brotli the API Gateway messes up with the response before it is sent to client and the client is unable to decode it.

The proposal is to add br to the list of BINARY_ENCODINGS so that if the Accept-Encoding header has brotli br in it, the response should be sent as base64 encoded strings.