While running locally all my responses are compressed but when running on serverless using sls deploy or sls dev I get net::ERR_CONTENT_DECODING_FAILED 200
I am assuming that serverless cant perform compression but the headers are set by the compression library and thus this error.
I need to compress my responses. I came across this as well but wasn't able to make it work (Nothing was being compressed).
I have used
compression
in my express application like so:While running locally all my responses are compressed but when running on serverless using
sls deploy
orsls dev
I getnet::ERR_CONTENT_DECODING_FAILED 200
I am assuming that serverless cant perform compression but the headers are set by the compression library and thus this error.I need to compress my responses. I came across this as well but wasn't able to make it work (Nothing was being compressed).
Here is my
serverless.yml
Any help is appreciated. Thanks.