mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 13:37:37 +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 send from 'koa-send';
|
||||||
import serve from 'koa-static';
|
import serve from 'koa-static';
|
||||||
import { PluginOptions } from '@nocobase/server';
|
import { PluginOptions } from '@nocobase/server';
|
||||||
import compress from 'koa-compress';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'client',
|
name: 'client',
|
||||||
@ -11,19 +10,6 @@ export default {
|
|||||||
if (root && !root.startsWith('/')) {
|
if (root && !root.startsWith('/')) {
|
||||||
root = path.resolve(process.cwd(), root);
|
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) => {
|
this.app.middleware.unshift(async (ctx, next) => {
|
||||||
if (!root) {
|
if (!root) {
|
||||||
return next();
|
return next();
|
||||||
|
Loading…
Reference in New Issue
Block a user