Fixed agent locking url when AgentAliasDNS is used.

This commit is contained in:
Ylian Saint-Hilaire 2022-06-17 09:22:10 -07:00
parent d5570b8cbd
commit 1fbbc6caaa
2 changed files with 5 additions and 16 deletions

View File

@ -2865,7 +2865,9 @@ function CreateMeshCentralServer(config, args) {
serverSignedAgentsPath = obj.path.join(obj.datapath, 'signedagents' + suffix); serverSignedAgentsPath = obj.path.join(obj.datapath, 'signedagents' + suffix);
signDesc = (domain.title ? domain.title : agentSignCertInfo.cert.subject.hash); signDesc = (domain.title ? domain.title : agentSignCertInfo.cert.subject.hash);
var httpsPort = ((obj.args.aliasport == null) ? obj.args.port : obj.args.aliasport); // Use HTTPS alias port is specified var httpsPort = ((obj.args.aliasport == null) ? obj.args.port : obj.args.aliasport); // Use HTTPS alias port is specified
signUrl = 'https://' + ((domain.dns != null) ? domain.dns : obj.certificates.CommonName); var httpsHost = ((domain.dns != null) ? domain.dns : obj.certificates.CommonName);
if (obj.args.agentaliasdns != null) { httpsHost = obj.args.agentaliasdns; }
signUrl = 'https://' + httpsHost;
if (httpsPort != 443) { signUrl += ':' + httpsPort; } if (httpsPort != 443) { signUrl += ':' + httpsPort; }
var xdomain = (domain.dns == null) ? domain.id : ''; var xdomain = (domain.dns == null) ? domain.id : '';
if (xdomain != '') xdomain += '/'; if (xdomain != '') xdomain += '/';

View File

@ -37,34 +37,21 @@
"sample-config-advanced.json" "sample-config-advanced.json"
], ],
"dependencies": { "dependencies": {
"@yetzt/nedb": "^1.8.0",
"archiver": "^5.3.1", "archiver": "^5.3.1",
"body-parser": "^1.19.0", "body-parser": "^1.19.0",
"cbor": "~5.2.0", "cbor": "~5.2.0",
"compression": "^1.7.4", "compression": "^1.7.4",
"cookie-session": "^1.4.0", "cookie-session": "^1.4.0",
"esprima": "^4.0.1",
"express": "^4.17.0", "express": "^4.17.0",
"express-handlebars": "^5.3.5", "express-handlebars": "^5.3.5",
"express-ws": "^4.0.0", "express-ws": "^4.0.0",
"html-minifier": "^4.0.0",
"image-size": "^1.0.1",
"ipcheck": "^0.1.0", "ipcheck": "^0.1.0",
"jsdom": "^19.0.0",
"loadavg-windows": "^1.1.1",
"minify-js": "^0.0.4",
"minimist": "^1.2.5", "minimist": "^1.2.5",
"multiparty": "^4.2.1", "multiparty": "^4.2.1",
"@yetzt/nedb": "^1.8.0",
"node-forge": "^1.0.0", "node-forge": "^1.0.0",
"node-windows": "^0.1.4",
"nodemailer": "^6.7.5",
"otplib": "^10.2.3",
"pg": "^8.7.1",
"pgtools": "^0.3.2",
"web-push": "^3.5.0",
"ws": "^5.2.3", "ws": "^5.2.3",
"yauzl": "^2.10.0", "yauzl": "^2.10.0"
"yubikeyotp": "^0.2.0"
}, },
"engines": { "engines": {
"node": ">=10.0.0" "node": ">=10.0.0"