summary refs log tree commit diff
path: root/src/middlewares/GlobalRateLimit.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-10 14:34:54 +0100
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-10 14:34:54 +0100
commit9b95834b4bd7568d42cace469fcfc179093d96e5 (patch)
treefd10eccba830a6de66434509cc3dfee134d9fc3f /src/middlewares/GlobalRateLimit.ts
parentMerge branch 'master' of https://github.com/discord-open-source/discord-api (diff)
downloadserver-9b95834b4bd7568d42cace469fcfc179093d96e5.tar.xz
:bug: fix error handler
Diffstat (limited to 'src/middlewares/GlobalRateLimit.ts')
-rw-r--r--src/middlewares/GlobalRateLimit.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/middlewares/GlobalRateLimit.ts b/src/middlewares/GlobalRateLimit.ts

index 121616f8..73a8c08a 100644 --- a/src/middlewares/GlobalRateLimit.ts +++ b/src/middlewares/GlobalRateLimit.ts
@@ -2,6 +2,9 @@ import { NextFunction, Request, Response } from "express"; import Config from "../util/Config"; import { db } from "discord-server-util"; +// TODO: use mongodb ttl index +// TODO: increment count on serverside + export async function GlobalRateLimit(req: Request, res: Response, next: NextFunction) { if (!Config.get().limits.rate.ip.enabled) return next();