sensor and location done and some cleanupd
testing will be required
This commit is contained in:
9
Sean/modules/rateLimitMiddleware.js
Normal file
9
Sean/modules/rateLimitMiddleware.js
Normal file
@ -0,0 +1,9 @@
|
||||
const rateLimit = require('express-rate-limit');
|
||||
|
||||
const limiter = rateLimit({
|
||||
windowMs: 15 * 60 * 1000, // 15 minutes
|
||||
max: 5, // limit each IP to 5 requests per windowMs
|
||||
message: 'Too many login attempts from this IP, please try again later.',
|
||||
});
|
||||
|
||||
module.exports = limiter;
|
Reference in New Issue
Block a user