proxy-middleware: just pass a string
This commit is contained in:
@@ -35,8 +35,7 @@ async function proxyToMailContainer(port, pathname, req, res, next) {
|
||||
parsedUrl.query['access_token'] = addonDetails.token;
|
||||
req.url = url.format({ pathname, query: parsedUrl.query });
|
||||
|
||||
const proxyOptions = url.parse(`http://${addonDetails.ip}:${port}`);
|
||||
const mailserverProxy = middleware.proxy(proxyOptions);
|
||||
const mailserverProxy = middleware.proxy(`http://${addonDetails.ip}:${port}`);
|
||||
|
||||
req.clearTimeout(); // TODO: add timeout to mail server proxy logic instead of this
|
||||
mailserverProxy(req, res, function (error) {
|
||||
|
||||
Reference in New Issue
Block a user