fix: remove compress middleware

This commit is contained in:
chenos 2021-10-02 23:21:00 +08:00
parent 29d386a63d
commit ff7757bf99

View File

@ -2,7 +2,6 @@ import path from 'path';
import send from 'koa-send';
import serve from 'koa-static';
import { PluginOptions } from '@nocobase/server';
import compress from 'koa-compress';
export default {
name: 'client',
@ -11,19 +10,6 @@ export default {
if (root && !root.startsWith('/')) {
root = path.resolve(process.cwd(), root);
}
this.app.use(compress({
// filter (content_type) {
// return /text/i.test(content_type)
// },
threshold: 20480,
// gzip: {
// flush: require('zlib').constants.Z_SYNC_FLUSH
// },
// deflate: {
// flush: require('zlib').constants.Z_SYNC_FLUSH,
// },
// br: false // disable brotli
}));
this.app.middleware.unshift(async (ctx, next) => {
if (!root) {
return next();