New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

express-brute-loki

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-brute-loki

A Loki.js store for express-brute

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

express-brute-loki

NPM version Build Status Codacy Badge Dependency Status Known Vulnerabilities License

A Loki.js store for Express-Brute

Installation

npm install express-brute-loki

Usage

var ExpressBrute = require('express-brute'),
    ExpressBruteLokiStore = require('express-brute-loki');

var store = new ExpressBruteLokiStore({
    path: './brute.db' // See all available options below
});
var bruteforce = new ExpressBrute(store);

app.post('/auth',
    bruteforce.prevent, // error 403 if we hit this route too often
    function (req, res, next) {
        res.send('Success!');
    }
);

Options

Setting the path to the database file is optional but recommended.

Available parameters:

  • path Path to the database file. Defaults to ./brute-store.db
  • autosave Set false to disable save to disk. Defaults to true
  • ttl Duration in seconds to keep entries. Set to 0 to disable TTL. Defaults to 0
  • logErrors Whether or not to log client errors. Defaults to false
    • If true, a default logging function (console.error) is provided.
    • If a function, it is called anytime an error occurs (useful for custom logging)
    • If false, no logging occurs.

License

MIT

Keywords

FAQs

Package last updated on 25 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc