
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
express-brute-loki
Advanced tools
npm install express-brute-loki
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!');
}
);
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
true
, a default logging function (console.error
) is provided.false
, no logging occurs.MIT
FAQs
A Loki.js store for express-brute
We found that express-brute-loki demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.