From ee5a413598f20cf34bd474effdb2d5f221aaf184 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Wed, 15 Mar 2017 15:37:32 -0300 Subject: [PATCH] add ignoreRateLimiter option --- lib/expressapp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/expressapp.js b/lib/expressapp.js index bfc402b..de1d15d 100644 --- a/lib/expressapp.js +++ b/lib/expressapp.js @@ -173,7 +173,7 @@ ExpressApp.prototype.start = function(opts, cb) { var createWalletLimiter; - if (Defaults.RateLimit.createWallet) { + if (Defaults.RateLimit.createWallet && !opts.ignoreRateLimiter) { log.info('', 'Limiting wallet creation per IP: %d req/h', (Defaults.RateLimit.createWallet.max / Defaults.RateLimit.createWallet.windowMs * 60 * 60 * 1000).toFixed(2)) createWalletLimiter = new RateLimit(Defaults.RateLimit.createWallet); // router.use(/\/v\d+\/wallets\/$/, createWalletLimiter)