express-brute-sequelize-js
v1.0.1
Published
Sequelize store for express-brute
Downloads
5
Readme
express-brute-sequelize-js
Sequelize MySQL store adapter for the express-brute.
Purpose
Used for stripping out special characters from all request parameters, thus avoiding basic injection attacks through invalid parameters.
Installation
$ npm install --save express-brute-sequelize-js
Usage
var ExpressBrute = require('express-brute');
var SequelizeStore = require('express-brute-sequelize-js');
var Sequelize = require('sequelize');
var sequelize = new Sequelize('test', 'root', 'root', {
host: "127.0.0.1",
dialect: "mysql",
logging: false
});
var store = new SequelizeStore(sequelize, 'bruteStore', {});
store.migrate();
var bruteforce = new ExpressBrute(store);
app.post('/session',
bruteforce.prevent, // error 403 if too many requests for this route in short time
function(req, res, next){
res.send('Success!');
}
);
Issue Reporting
If you have found a bug or if you have a feature request, please report them at this repository issues section.
License
This project is licensed under the MIT license. See the LICENSE file for more info.