From 8ae90ecb0360a3672cd60e34ed2eefbeb6e39eb6 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sat, 2 Jul 2022 21:58:52 +1000 Subject: [PATCH] Apparently headers are always lower case, nice --- slowcord/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slowcord/src/index.ts b/slowcord/src/index.ts index 61e6b6a0..05a1433c 100644 --- a/slowcord/src/index.ts +++ b/slowcord/src/index.ts @@ -84,7 +84,7 @@ app.use((req, res, next) => { if (requestsThisSecond > allowedRequestsPerSecond) return res.sendStatus(429); - const ip = (req.headers["X-Forwarded-For"] as string) || req.socket.remoteAddress as string; + const ip = (req.headers["x-forwarded-for"] as string) || req.socket.remoteAddress as string; console.log(`${ip}`); if (!rateLimits[ip]) { rateLimits[ip] = Date.now() + allowRequestsEveryMs;