1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Improved support for reverse-proxy certificate loading.

This commit is contained in:
Ylian Saint-Hilaire 2019-10-29 16:17:29 -07:00
parent bdd1a5b2e2
commit f062c98aad
6 changed files with 127 additions and 88 deletions

View file

@ -196,7 +196,6 @@ module.exports.CertificateOperations = function (parent) {
// Return the certificate of the remote HTTPS server
obj.loadCertificate = function (url, hostname, tag, func) {
console.log('loadCertificate', url, hostname);
const u = require('url').parse(url);
if (u.protocol == 'https:') {
// Read the certificate from HTTPS
@ -218,7 +217,7 @@ module.exports.CertificateOperations = function (parent) {
func(url, data, hostname, tag);
}
});
} else { func(url, null, tag); }
} else { func(url, null, hostname, tag); }
};
// Check if a configuration file exists