Hardik
Initial commit: Sentiment Analysis HF Space
3a93fb9
Raw
History Blame Contribute Delete
386 Bytes
const rateLimit = require('express-rate-limit');
const apiLimiter = rateLimit({
windowMs: 15 * 60 * 1000, // 15 minutes
max: 100, // Limit each IP to 100 requests per windowMs
message: {
error: "Too many requests",
message: "You have exceeded the 100 requests in 15 mins limit!"
},
standardHeaders: true,
legacyHeaders: false,
});
module.exports = { apiLimiter };