From 10d11e08673c4ed54a9687754fdd6830c69e50ec Mon Sep 17 00:00:00 2001 From: Theo Sanderson Date: Tue, 28 Nov 2023 13:52:18 +0000 Subject: [PATCH] enable limiter --- proxy/server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proxy/server.js b/proxy/server.js index 7ac16cc5..f0a1fb1e 100644 --- a/proxy/server.js +++ b/proxy/server.js @@ -24,13 +24,13 @@ app.use(cors(corsOptions)); // Rate limiting middleware -/*const limiter = rateLimit({ +const limiter = rateLimit({ windowMs: 15 * 60 * 1000, // 15 minutes max: 100, // limit each IP to 100 requests per windowMs }); -*/ + // Apply the rate limiter to all requests -//app.use(limiter); +app.use(limiter); // Proxy endpoint app.get("/proxy", async (req, res) => {