serverless-api-compression

1.0.1 • Public • Published

serverless-content-compression

Serverless plugin that enables/disables content compression setting in API Gateway

Why

Currently Serverless Framework does not support MinimumCompressionSize settings.

Existing plugin serverless-content-encoding implementation is not optimal and causing "Too Many requests" error.

How to use

  1. npm install --save-dev serverless-api-compression

  2. Add plugin to your serverless.yml config

plugins:
   - serverless-api-compression
  1. Add contentCompression attribute to your custom section
 custom:
  contentCompression: 1024

contentCompression value is a MinimumCompressionSize in bytes. Use 0 to enable compression for all responses. Use null or false to disable it.

Readme

Keywords

none

Package Sidebar

Install

npm i serverless-api-compression

Weekly Downloads

2,871

Version

1.0.1

License

MIT

Unpacked Size

39.1 kB

Total Files

5

Last publish

Collaborators

  • eugene.k