From ff7757bf99d0c199c36a158695a1ee415830dfc0 Mon Sep 17 00:00:00 2001 From: chenos Date: Sat, 2 Oct 2021 23:21:00 +0800 Subject: [PATCH] fix: remove compress middleware --- packages/plugin-client/src/server.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/packages/plugin-client/src/server.ts b/packages/plugin-client/src/server.ts index c813450d0..72a8d9f7d 100644 --- a/packages/plugin-client/src/server.ts +++ b/packages/plugin-client/src/server.ts @@ -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();