filemanager: fix sending of double header
we should not proceed to notFoundHandler if proxy handled it just fine
This commit is contained in:
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user