From 00b4ee0032a9bfc5368160f8290872af6164514c Mon Sep 17 00:00:00 2001 From: Gabriel Cardona Date: Sun, 1 Jul 2018 11:05:58 +0900 Subject: [PATCH] Increase rate limit to 60 requests per minute. --- app.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index 01f06853..eab02e0c 100644 --- a/app.js +++ b/app.js @@ -30,12 +30,12 @@ app.use(cors()) app.enable('trust proxy'); let limiter = new RateLimit({ windowMs: 60000, // 1 minute - max: 40, // limit each IP to 20 requests per windowMs + max: 60, // limit each IP to 20 requests per windowMs delayMs: 0, // disable delaying - full speed until the max limit is reached handler: function (req, res, /*next*/) { res.format({ json: function(){ - res.status(500).json({ error: 'Too many requests. Limits are 40 requests per minute.'}); + res.status(500).json({ error: 'Too many requests. Limits are 60 requests per minute.'}); } }); } diff --git a/package.json b/package.json index fbbb649c..55fefc50 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rest-cloud", - "version": "1.1.3", + "version": "1.1.4", "private": true, "scripts": { "start": "node ./bin/www",