From 05c77e2f1b85f37523767427b39083815d7b9fd6 Mon Sep 17 00:00:00 2001 From: anupamme Date: Wed, 12 Aug 2026 18:43:56 +0000 Subject: [PATCH] fix: the application exposes two public api endpoint... in server.js The application exposes two public API endpoints (/api/health and /api/contact) without any rate limiting middleware --- package.json | 1 + server.js | 1 + 2 files changed, 2 insertions(+) diff --git a/package.json b/package.json index 44d83eb..77828cb 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "cors": "^2.8.6", "dotenv": "^17.4.2", "express": "^5.2.1", + "express-rate-limit": "^7.5.0", "nodemailer": "^9.0.5" } } diff --git a/server.js b/server.js index ea90eb8..255a99c 100644 --- a/server.js +++ b/server.js @@ -8,6 +8,7 @@ const express = require('express'); const cors = require('cors'); const path = require('path'); const nodemailer = require('nodemailer'); +const rateLimit = require('express-rate-limit'); require('dotenv').config(); const app = express();