From 9b95834b4bd7568d42cace469fcfc179093d96e5 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Wed, 10 Feb 2021 14:34:54 +0100 Subject: :bug: fix error handler --- src/middlewares/GlobalRateLimit.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/middlewares/GlobalRateLimit.ts') 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(); -- cgit 1.5.1