mirror of
https://github.com/Akif9748/akf-forum.git
synced 2025-07-16 11:41:00 +03:00
Forum Setup page, edit forum config w/api ban user's all ips, secretmodel deleted, /undelete is disabled and better themes if user reacted a message, view it fixs for reactions of messages discord auth in config.json
13 lines
No EOL
424 B
JavaScript
13 lines
No EOL
424 B
JavaScript
const RL = require('express-rate-limit');
|
|
|
|
module.exports = {
|
|
threadEnum: ["OPEN", "APPROVAL", "DELETED"],
|
|
themes: ["default", "black"],
|
|
RL(windowMs = 60_000, max = 1) {
|
|
return RL({
|
|
windowMs, max, standardHeaders: true, legacyHeaders: false,
|
|
handler: (req, res, next, opts) => !req.user?.admin ? res.error(opts.statusCode, "You are begin ratelimited") : next()
|
|
})
|
|
}
|
|
|
|
} |