express-hellban
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "express-hellban", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"author": "Joel Wietelmann <jwietelmann@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "Express.js middleware for hellbanning lusers.", |
@@ -6,2 +6,4 @@ express-hellban | ||
For banned users, this middleware waits a random number of milliseconds before either responding successfully or throwing a 500 error. Wait time range, failure rate, and success/failure behavior is configurable | ||
```javascript | ||
@@ -28,5 +30,5 @@ | ||
maxWaitTime: 10000, | ||
onSuccess: function(req, res, next) { next(); }, | ||
onFailure: function(req, res, next) { res.send(500); } | ||
onSuccess: function(req, res, next) { next(); }, // just go to the next matching route | ||
onFailure: function(req, res, next) { res.send(500); } // HTTP 500 error | ||
})); | ||
``` |
2456
33