From f0856239c32ed06a3307bea6a3b0a5c7055f5157 Mon Sep 17 00:00:00 2001 From: Bobby Wibowo Date: Thu, 14 Jul 2022 18:34:50 +0700 Subject: [PATCH] feat: warn when deprecated rateLimits is in config --- lolisafe.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lolisafe.js b/lolisafe.js index 8f9098f..622a31b 100644 --- a/lolisafe.js +++ b/lolisafe.js @@ -70,6 +70,9 @@ if (Array.isArray(config.rateLimiters)) { safe.use(route, rateLimiterInstance.middleware) } } +} else if (config.rateLimits) { + logger.error('Config option "rateLimits" is deprecated.') + logger.error('Please consult the provided sample file for the new option "rateLimiters".') } // Helmet security headers