diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-04-26 11:46:42 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-04-26 11:46:42 +0900 |
| commit | bc8a0083e262c724ef4d803a4f2a9f076377341c (patch) | |
| tree | 449e1a28cbf49a6eaa4d03eab1b3165f7e437fe3 /src/server/index.ts | |
| parent | wip (diff) | |
| download | sharkey-bc8a0083e262c724ef4d803a4f2a9f076377341c.tar.gz sharkey-bc8a0083e262c724ef4d803a4f2a9f076377341c.tar.bz2 sharkey-bc8a0083e262c724ef4d803a4f2a9f076377341c.zip | |
wip
Diffstat (limited to 'src/server/index.ts')
| -rw-r--r-- | src/server/index.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/index.ts b/src/server/index.ts index 2b5a910507..594f40c22f 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -11,6 +11,7 @@ import * as Router from 'koa-router'; import * as mount from 'koa-mount'; import * as compress from 'koa-compress'; import * as logger from 'koa-logger'; +const slow = require('koa-slow'); import activityPub from './activitypub'; import webFinger from './webfinger'; @@ -23,6 +24,11 @@ app.proxy = true; if (process.env.NODE_ENV != 'production') { // Logger app.use(logger()); + + // Delay + app.use(slow({ + delay: 1000 + })); } // Compress response |