fix(server): Remove koa-compress

This commit is contained in:
syuilo
2020-05-10 17:41:16 +09:00
parent 8b853b7970
commit be183206e6
3 changed files with 2 additions and 43 deletions

View File

@ -6,11 +6,9 @@ import * as fs from 'fs';
import * as http from 'http';
import * as http2 from 'http2';
import * as https from 'https';
import * as zlib from 'zlib';
import * as Koa from 'koa';
import * as Router from '@koa/router';
import * as mount from 'koa-mount';
const compress = require('koa-compress');
import * as koaLogger from 'koa-logger';
import * as requestStats from 'request-stats';
import * as slow from 'koa-slow';
@ -48,12 +46,6 @@ if (!['production', 'test'].includes(process.env.NODE_ENV || '')) {
}
}
// Compress response
app.use(compress({
flush: zlib.constants.Z_SYNC_FLUSH,
br: false
}));
// HSTS
// 6months (15552000sec)
if (config.url.startsWith('https') && !config.disableHsts) {