fix: add HEAD check to unsub route

This commit is contained in:
Barış Soner Uşaklı
2025-01-16 13:56:57 -05:00
parent 0cc94bbe19
commit 205bf47783

View File

@@ -126,6 +126,9 @@ const doUnsubscribe = async (payload) => {
};
settingsController.unsubscribe = async (req, res) => {
if (req.method === 'HEAD') {
return res.sendStatus(204);
}
try {
const payload = await jwtVerifyAsync(req.params.token);
if (!payload || !unsubscribable.includes(payload.template)) {