fix: don't confirm emails on HEAD request

outlook safelinks triggers page twice
This commit is contained in:
Barış Soner Uşaklı
2025-01-08 17:21:05 -05:00
parent 98e5d1b5c2
commit 45eabbf5ba

View File

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