From 39095c16a9cfcefd4b049980c86d98208af68c58 Mon Sep 17 00:00:00 2001 From: jessop Date: Fri, 21 Jun 2019 14:40:07 -0400 Subject: [PATCH] changes max publishes to 20 --- server/middleware/autoblockPublishMiddleware.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/middleware/autoblockPublishMiddleware.js b/server/middleware/autoblockPublishMiddleware.js index 426323a1..5238280b 100644 --- a/server/middleware/autoblockPublishMiddleware.js +++ b/server/middleware/autoblockPublishMiddleware.js @@ -7,7 +7,7 @@ const { const ipBanFile = './site/config/ipBan.txt'; const forbiddenMessage = '

Forbidden

If you are seeing this by mistake, please contact us using https://chat.lbry.com/'; - +const maxPublishesInTenMinutes = 20; let ipCounts = {}; let blockedAddresses = []; @@ -44,7 +44,7 @@ const autoblockPublishMiddleware = (req, res, next) => { } }, 600000 /* 10 minute retainer */); - if (count === 10) { + if (count === maxPublishesInTenMinutes) { logger.error(`Banning IP: ${ip}`); blockedAddresses.push(ip); res.status(403).send(forbiddenMessage);