mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-10 01:23:04 +01:00
fix: add HEAD check to unsub route
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user