fix(server): Remove koa-compress
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user