hexo/node_modules/hexo-server/lib/middlewares/gzip.js

11 lines
192 B
JavaScript

'use strict';
const compress = require('compression');
module.exports = function(app) {
const config = this.config.server || {};
if (!config.compress) return;
app.use(compress());
};