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

11 lines
202 B
JavaScript
Raw Normal View History

2023-10-03 11:14:36 +08:00
'use strict';
const compress = require('compression');
module.exports = function(app) {
const config = this.config.server || {};
if (!config.compress) return;
app.use(compress());
};