mirror of
https://github.com/strapi/strapi.git
synced 2025-08-13 03:07:32 +00:00
30 lines
344 B
JavaScript
Executable File
30 lines
344 B
JavaScript
Executable File
'use strict';
|
|
|
|
/**
|
|
* Gzip hook
|
|
*/
|
|
|
|
module.exports = strapi => {
|
|
return {
|
|
/**
|
|
* Default options
|
|
*/
|
|
|
|
defaults: {
|
|
gzip: {
|
|
enabled: false
|
|
}
|
|
},
|
|
|
|
/**
|
|
* Initialize the hook
|
|
*/
|
|
|
|
initialize: function(cb) {
|
|
strapi.app.use(strapi.koaMiddlewares.compress());
|
|
|
|
cb();
|
|
}
|
|
};
|
|
};
|