@harshror77/rate-limiter-sdk 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -4,6 +4,10 @@ export function RateLimiterMiddleware({ serviceUrl, apiKey, timeout, onLimitExce
|
|
|
4
4
|
const client = new RateLimiterClient({ serviceUrl, apiKey, timeout });
|
|
5
5
|
|
|
6
6
|
return async function (req, res, next) {
|
|
7
|
+
if (req.method === 'OPTIONS' || req.originalUrl === '/favicon.ico') {
|
|
8
|
+
return next();
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
try {
|
|
8
12
|
const result = await client.check({
|
|
9
13
|
ip: req.ip,
|