sails-hook-rate-limit
v0.0.2
Published
Sails hook for rate limiting
Downloads
145
Maintainers
Readme
sails-hook-rate-limit
This Sails hook is a wrapper of express-rate-limit
Installation
npm i --save sails-hook-rate-limit
Setup
Create a rate-limit.js
config file in config/
.
module.exports.rateLimit = {
windowMs: 10 * 60 * 1000 // 10 minutes
max: 100,
standardHeaders: true, // Return rate limit info in the `RateLimit-*` headers
legacyHeaders: false, // Disable the `X-RateLimit-*` headers
}
The config object takes the same properties and methods as described in the configuration docs of
express-rate-limit