From 6fe71d6f271adcaa412c4efb1779cbdf7cc97ac3 Mon Sep 17 00:00:00 2001 From: TheJeterLP Date: Fri, 29 Mar 2024 01:10:11 +0100 Subject: [PATCH] Remove ratelimiter because cloudflare handles that already --- package-lock.json | 21 --------------------- package.json | 1 - src/main/typescript/server.ts | 7 ------- 3 files changed, 29 deletions(-) diff --git a/package-lock.json b/package-lock.json index 95842d0..7dc3aba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,6 @@ "cookie-parser": "^1.4.6", "cors": "^2.8.5", "express": "^4.19.2", - "express-rate-limit": "^7.2.0", "express-session": "^1.18.0", "jsonwebtoken": "^9.0.2", "jwt-decode": "^4.0.0", @@ -1438,20 +1437,6 @@ "node": ">= 0.10.0" } }, - "node_modules/express-rate-limit": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.2.0.tgz", - "integrity": "sha512-T7nul1t4TNyfZMJ7pKRKkdeVJWa2CqB8NA1P8BwYaoDI5QSBZARv5oMS43J7b7I5P+4asjVXjb7ONuwDKucahg==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://github.com/sponsors/express-rate-limit" - }, - "peerDependencies": { - "express": "4 || 5 || ^5.0.0-beta.1" - } - }, "node_modules/express-session": { "version": "1.18.0", "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.18.0.tgz", @@ -4540,12 +4525,6 @@ } } }, - "express-rate-limit": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.2.0.tgz", - "integrity": "sha512-T7nul1t4TNyfZMJ7pKRKkdeVJWa2CqB8NA1P8BwYaoDI5QSBZARv5oMS43J7b7I5P+4asjVXjb7ONuwDKucahg==", - "requires": {} - }, "express-session": { "version": "1.18.0", "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.18.0.tgz", diff --git a/package.json b/package.json index a903ee5..050367d 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,6 @@ "cookie-parser": "^1.4.6", "cors": "^2.8.5", "express": "^4.19.2", - "express-rate-limit": "^7.2.0", "express-session": "^1.18.0", "jsonwebtoken": "^9.0.2", "jwt-decode": "^4.0.0", diff --git a/src/main/typescript/server.ts b/src/main/typescript/server.ts index 883c22c..1d29157 100644 --- a/src/main/typescript/server.ts +++ b/src/main/typescript/server.ts @@ -2,7 +2,6 @@ * Required external modules */ import express, { Application } from 'express'; -import RateLimit from 'express-rate-limit'; import cors from 'cors'; import mongoose from 'mongoose'; import session from 'express-session'; @@ -39,11 +38,6 @@ import path from 'node:path'; * App Variables */ const app: Application = express(); -const limiter = RateLimit({ - // 15 minutes - windowMs: 15 * 60 * 1000, - limit: 100, -}); /** * Database connection @@ -59,7 +53,6 @@ app.use(cors({ origin: server_settings.frontend_url, credentials: true, })); -app.use(limiter); app.use(cookies()); app.use(express.json()); app.use(express.urlencoded({ extended: true }));