Skip to content

Commit

Permalink
fix: don't confirm emails on HEAD request
Browse files Browse the repository at this point in the history
outlook safelinks triggers page twice
  • Loading branch information
barisusakli committed Jan 8, 2025
1 parent 98e5d1b commit 45eabbf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 45eabbf

Please sign in to comment.