randydev commited on
Commit
c3052e3
·
verified ·
1 Parent(s): 84669c7

Update middleware/midware.js

Browse files
Files changed (1) hide show
  1. middleware/midware.js +2 -1
middleware/midware.js CHANGED
@@ -24,13 +24,14 @@ const authenticateApiKey = async (req, res, next) => {
24
  }
25
  };
26
 
27
- const dbUrls = `mongodb+srv://${config.USERNAME}:${config.PASSWORD}@cluster0.1asx6h1.mongodb.net/?retryWrites=true&w=majority`
28
 
29
  const apiLimiter = rateLimit({
 
30
  store: new MongoStore({
31
  uri: dbUrls,
32
  collectionName: "rateLimits",
33
  }),
 
34
  windowMs: 2 * 60 * 1000,
35
  max: 3,
36
  keyGenerator: (req) => req.headers["x-api-key"],
 
24
  }
25
  };
26
 
 
27
 
28
  const apiLimiter = rateLimit({
29
+ /*
30
  store: new MongoStore({
31
  uri: dbUrls,
32
  collectionName: "rateLimits",
33
  }),
34
+ */
35
  windowMs: 2 * 60 * 1000,
36
  max: 3,
37
  keyGenerator: (req) => req.headers["x-api-key"],