1.0.3 • Published 2 years ago
egg-plugin-gzip v1.0.3
egg-plugin-gzip
开启gzip压缩
Install
# use npm
$ npm i egg-plugin-gzip --save
# use pnpm
$ pnpm add egg-plugin-gzip
# use yarn
$ yarn add egg-plugin-gzip
Usage
// {app_root}/config/plugin.js
exports.gzip = {
enable: true,
package: 'egg-plugin-gzip'
}
Configuration
No compression for response bodies smaller than 256 bytes
// {app_root}/config/config.default.js
exports.gzip = {
threshold: 256
}
Questions & Suggestions
Please open an issue here.