From 0926ae6ecf28390cc3dd31f51af59c716ec618f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 25 Oct 2021 20:47:10 -0400 Subject: [PATCH] fix: api session revoke test --- src/controllers/errors.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/controllers/errors.js b/src/controllers/errors.js index 5677b66007..58f12d9f98 100644 --- a/src/controllers/errors.js +++ b/src/controllers/errors.js @@ -49,6 +49,9 @@ exports.handleErrors = async function handleErrors(err, req, res, next) { // esl }, }; const defaultHandler = async function () { + if (res.headersSent) { + return; + } // Display NodeBB error page const status = parseInt(err.status, 10); if ((status === 302 || status === 308) && err.path) {