mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-26 13:20:41 +03:00
fix
Co-authored-by: Sapphire1525 <Sapphire1525@users.noreply.github.com>
This commit is contained in:
parent
7eb3efe3a6
commit
7e285e91fa
2 changed files with 7 additions and 2 deletions
|
@ -6,7 +6,12 @@ const app = Router();
|
|||
|
||||
app.get("/", (req, res) => res.render("register"));
|
||||
|
||||
app.post("/", async (req, res) => {
|
||||
app.post("/", rateLimit({
|
||||
windowMs: 24*60*60_000, max: 1, standardHeaders: true, legacyHeaders: false,
|
||||
handler: (request, response, next, options) =>
|
||||
response.error(options.statusCode, "You are begin ratelimited")
|
||||
|
||||
}), async (req, res) => {
|
||||
req.session.userid = null;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue