summary refs log tree commit diff
path: root/slowcord/src
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-07-02 21:58:52 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-07-02 21:58:52 +1000
commit39fe1dc184c9ee235f02593810480441fbda97d9 (patch)
tree07660d5938bade680161d468b6b78288b9a87f62 /slowcord/src
parentRemove whitelist for discord oauth login, add rate limit (diff)
downloadserver-39fe1dc184c9ee235f02593810480441fbda97d9.tar.xz
Apparently headers are always lower case, nice
Diffstat (limited to 'slowcord/src')
-rw-r--r--slowcord/src/index.ts2
1 files changed, 1 insertions, 1 deletions
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;