diff --git a/src/router/indexRouter.js b/src/router/indexRouter.js index 6096eda..d58ea74 100644 --- a/src/router/indexRouter.js +++ b/src/router/indexRouter.js @@ -60,6 +60,9 @@ router.get('/', (_req, res) => { const recent_posters = [] router.post('/comment', (req, res) => { + if (req.body.checkbox === "on"){ + return res.redirect('/home#visitor_table') + } const ip = req.header('x-forwarded-for') || req.connection.remoteAddress; if(recent_posters.some( poster => poster.ip === ip)){ console.log("spammer, " + ip) diff --git a/views/home.hbs b/views/home.hbs index 9574eb4..133f72e 100644 --- a/views/home.hbs +++ b/views/home.hbs @@ -327,6 +327,9 @@

+ +
+