Co-authored-by: Sapphire1525 <Sapphire1525@users.noreply.github.com>
This commit is contained in:
Akif9748 2022-08-24 22:27:23 +03:00
parent 7eb3efe3a6
commit 7e285e91fa
2 changed files with 7 additions and 2 deletions

View file

@ -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;

View file

@ -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;