server: remove slow option
This commit is contained in:
parent
67ebf83ed7
commit
b63e03942e
5 changed files with 0 additions and 32 deletions
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"node-option": [
|
||||
"experimental-specifier-resolution=node"
|
||||
],
|
||||
"slow": 1000,
|
||||
"timeout": 30000,
|
||||
"exit": true
|
||||
}
|
|
@ -62,7 +62,6 @@
|
|||
"koa-logger": "3.2.1",
|
||||
"koa-mount": "4.0.0",
|
||||
"koa-send": "5.0.1",
|
||||
"koa-slow": "2.1.0",
|
||||
"koa-views": "7.0.2",
|
||||
"mfm-js": "0.23.3",
|
||||
"mime-types": "2.1.35",
|
||||
|
|
14
packages/backend/src/@types/koa-slow.d.ts
vendored
14
packages/backend/src/@types/koa-slow.d.ts
vendored
|
@ -1,14 +0,0 @@
|
|||
declare module 'koa-slow' {
|
||||
import { Middleware } from 'koa';
|
||||
|
||||
interface ISlowOptions {
|
||||
url?: RegExp;
|
||||
delay?: number;
|
||||
}
|
||||
|
||||
function slow(options?: ISlowOptions): Middleware;
|
||||
|
||||
namespace slow {} // Hack
|
||||
|
||||
export = slow;
|
||||
}
|
|
@ -13,7 +13,6 @@ export const envOption = {
|
|||
noDaemons: false,
|
||||
disableClustering: false,
|
||||
withLogTime: false,
|
||||
slow: false,
|
||||
logLevel: LOG_LEVELS.info,
|
||||
};
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ import Koa from 'koa';
|
|||
import Router from '@koa/router';
|
||||
import mount from 'koa-mount';
|
||||
import koaLogger from 'koa-logger';
|
||||
import * as slow from 'koa-slow';
|
||||
|
||||
import { IsNull } from 'typeorm';
|
||||
import config from '@/config/index.js';
|
||||
|
@ -40,13 +39,6 @@ if (!['production', 'test'].includes(process.env.NODE_ENV || '')) {
|
|||
app.use(koaLogger(str => {
|
||||
serverLogger.info(str);
|
||||
}));
|
||||
|
||||
// Delay
|
||||
if (envOption.slow) {
|
||||
app.use(slow({
|
||||
delay: 3000,
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
// HSTS
|
||||
|
|
Loading…
Reference in a new issue