2015-10-01 00:30:16 +02:00

33 lines
392 B
JavaScript

'use strict';
/**
* Gzip hook
*/
module.exports = function (strapi) {
const hook = {
/**
* Default options
*/
defaults: {
gzip: true
},
/**
* Initialize the hook
*/
initialize: function (cb) {
if (strapi.config.gzip === true) {
strapi.app.use(strapi.middlewares.gzip());
}
cb();
}
};
return hook;
};