reverseproxy: async'ify

This commit is contained in:
Girish Ramakrishnan
2021-08-17 14:04:29 -07:00
parent 5bcf1bc47b
commit 5dd6f85025
10 changed files with 212 additions and 292 deletions

View File

@@ -668,7 +668,8 @@ function configureMail(mailFqdn, mailDomain, serviceConfig, callback) {
const memory = system.getMemoryAllocation(memoryLimit);
const cloudronToken = hat(8 * 128), relayToken = hat(8 * 128);
reverseProxy.getCertificatePath(mailFqdn, mailDomain, function (error, bundle) {
const getCertificatePath = util.callbackify(reverseProxy.getCertificatePath);
getCertificatePath(mailFqdn, mailDomain, function (error, bundle) {
if (error) return callback(error);
const dhparamsFilePath = path.join(paths.ADDON_CONFIG_DIR, 'mail/dhparams.pem');