Open
Description
I have used compression
in my express application like so:
const compression = require('compression');
const app = express();
app.use(compression());
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).
Here is my serverless.yml
org: rishav394
app: my-app
component: express
name: express-compress
inputs:
src: ./
Any help is appreciated. Thanks.