filemanager: fix sending of double header

we should not proceed to notFoundHandler if proxy handled it just fine
This commit is contained in:
Girish Ramakrishnan
2024-07-26 11:58:39 +02:00
parent 06e46e0f1e
commit d8aa4bc5e4
+1 -1
View File
@@ -38,7 +38,7 @@ function proxy(kind) {
const fileManagerProxy = middleware.proxy(proxyOptions);
fileManagerProxy(req, res, function (error) {
if (!error) return next();
if (!error) return; // note: response was already sent by proxy by this point
if (error.code === 'ECONNREFUSED') return next(new HttpError(424, 'Unable to connect to filemanager server'));
if (error.code === 'ECONNRESET') return next(new HttpError(424, 'Unable to query filemanager server'));