mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-26 21:30:42 +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
|
@ -66,7 +66,7 @@ function renderMessage(message) {
|
||||||
/**
|
/**
|
||||||
* Message Sender
|
* Message Sender
|
||||||
*/
|
*/
|
||||||
document.getElementById("send").addEventListener("submit", async e => {
|
document.getElementById("send").addEventListener("submit", async e => {
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const form = e.target;
|
const form = e.target;
|
||||||
|
|
|
@ -6,7 +6,12 @@ const app = Router();
|
||||||
|
|
||||||
app.get("/", (req, res) => res.render("register"));
|
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;
|
req.session.userid = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue