Skip to content

Node.js based forum software built for the modern web

fix: don't confirm emails on HEAD request

Barış Soner Uşaklı45eabbf5ba21
diff --git a/src/controllers/index.js b/src/controllers/index.js
index 3812d0bc55..447c75b663 100644
--- a/src/controllers/index.js
+++ b/src/controllers/index.js
@@ -228,6 +228,10 @@ Controllers.confirmEmail = async (req, res) => {
...opts,
});
}
+
+ if (req.method === 'HEAD') {
+ return renderPage();
+ }
try {
if (req.loggedIn) {
const emailValidated = await user.getUserField(req.uid, 'email:confirmed');