Glifery / cors-proxy

Simple AWS Lambda based proxy server for making CORS requests from browser to any HTTP server
49 stars 31 forks source link

passing accept-encoding causes problems #14

Open unwiredben opened 3 years ago

unwiredben commented 3 years ago

I just set this up and hit a weird case while testing. Firefox sends an "accept-encoding: gzip" header. The default behavior of the code to to pass this header on, but it doesn't include an encoding header with the returned data, so I was seeing results that were compressed but being interpreted badly by the receiver.

I locally solved it by just deleting any "accept-encoding" headers before sending the request, but it would probably be better to pass on the returned content-encoding header if provided.