mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 16:37:52 +01:00
make ratelimit more
This commit is contained in:
parent
d8f93dedd1
commit
3796095cbb
1 changed files with 4 additions and 4 deletions
|
@ -75,10 +75,10 @@
|
||||||
const sha384 = modules.hash;
|
const sha384 = modules.hash;
|
||||||
const rateLimit = require("express-rate-limit");
|
const rateLimit = require("express-rate-limit");
|
||||||
|
|
||||||
const limiter = rateLimit({
|
const limiter = rateLimit({
|
||||||
windowMs: 45 * 1000, // 45 Seconds
|
windowMs: 30 * 1000, // 30 second window
|
||||||
max: 886, // limit each IP to 866 requests per windowMs
|
max: 200, // limit each IP to 200 requests per 30 seconds
|
||||||
});
|
});
|
||||||
|
|
||||||
var app = modules.express();
|
var app = modules.express();
|
||||||
app.use(limiter);
|
app.use(limiter);
|
||||||
|
|
Loading…
Reference in a new issue