mailproxy: use http

This commit is contained in:
Girish Ramakrishnan
2021-12-21 12:29:46 -08:00
parent bb2d9fca9b
commit 2bc49682c4

View File

@@ -41,8 +41,7 @@ async function proxy(req, res, next) {
parsedUrl.query['access_token'] = addonDetails.token;
req.url = url.format({ pathname: pathname, query: parsedUrl.query });
const proxyOptions = url.parse(`https://${addonDetails.ip}:3000`);
proxyOptions.rejectUnauthorized = false;
const proxyOptions = url.parse(`http://${addonDetails.ip}:3000`);
const mailserverProxy = middleware.proxy(proxyOptions);
req.clearTimeout(); // TODO: add timeout to mail server proxy logic instead of this
@@ -73,4 +72,4 @@ async function setLocation(req, res, next) {
if (error) return next(BoxError.toHttpError(error));
next(new HttpSuccess(202, { taskId }));
}
}