replace with custom superagent based on fetch API

This commit is contained in:
Girish Ramakrishnan
2025-02-14 17:26:54 +01:00
parent 68a08b1f62
commit 8e58349bfa
66 changed files with 1086 additions and 1031 deletions

View File

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