We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9bd2bf commit 6d4e0caCopy full SHA for 6d4e0ca
sections/security/limitrequests.md
@@ -8,12 +8,10 @@ Rate limiting should be implemented in your application to protect a Node.js app
8
9
```javascript
10
const http = require('http');
11
- const redis = require('redis');
+ const IoRedis = require('ioredis');
12
const { RateLimiterRedis } = require('rate-limiter-flexible');
13
14
- const redisClient = redis.createClient({
15
- enable_offline_queue: false,
16
- });
+ const redisClient = new IoRedis({ enableOfflineQueue: false });
17
18
// Maximum 20 requests per second
19
const rateLimiter = new RateLimiterRedis({
0 commit comments