This commit is contained in:
Girish Ramakrishnan
2025-02-18 11:28:23 +01:00
parent 8bbf9b50b4
commit e45df6fa6d

View File

@@ -39,7 +39,7 @@ async function proxyToMailContainer(port, pathname, req, res, next) {
};
const sftpReq = http.request(opts, function (sftpRes) {
res.writeHead(sftpRes.status, sftpRes.headers);
res.writeHead(sftpRes.statusCode, sftpRes.headers);
sftpRes.on('error', (error) => next(new HttpError(500, `mailserver error: ${error.message} ${error.code}`)));
sftpRes.on('end', () => next());
sftpRes.pipe(res);