mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 11:36:42 +00:00
fix: remove compress middleware
This commit is contained in:
parent
29d386a63d
commit
ff7757bf99
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user