From d8c786df79e5f5e4d0184a3972232655d765d127 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Wed, 30 Nov 2016 13:01:53 -0300 Subject: [PATCH] better reg --- lib/expressapp.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/expressapp.js b/lib/expressapp.js index f0233ed..2896b1c 100644 --- a/lib/expressapp.js +++ b/lib/expressapp.js @@ -175,8 +175,7 @@ ExpressApp.prototype.start = function(opts, cb) { if (Defaults.RateLimit.createWallet) { log.info('', 'Limiting wallet creation per IP: %d req/h', (Defaults.RateLimit.createWallet.max / Defaults.RateLimit.createWallet.windowMs * 60 * 60 * 1000).toFixed(2)) var createWalletLimiter = new RateLimit(Defaults.RateLimit.createWallet); - router.use(/\v1\/wallets\/$/, createWalletLimiter) - router.use(/\/v2\/wallets\/$/, createWalletLimiter) + router.use(/\/v\d+\/wallets\/$/, createWalletLimiter) } // DEPRECATED