mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fixed mobile QR code when using non-standard port.
This commit is contained in:
parent
b6ebca0bd4
commit
516a763c1b
2 changed files with 11 additions and 5 deletions
10
meshuser.js
10
meshuser.js
|
@ -461,6 +461,16 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||
}
|
||||
serverinfo.https = true;
|
||||
serverinfo.redirport = args.redirport;
|
||||
|
||||
// Build the mobile agent URL, this is used to connect mobile devices
|
||||
var agentServerName = parent.getWebServerName(domain);
|
||||
if (typeof parent.args.agentaliasdns == 'string') { agentServerName = parent.args.agentaliasdns; }
|
||||
var xdomain = (domain.dns == null) ? domain.id : '';
|
||||
var agentHttpsPort = ((parent.args.aliasport == null) ? parent.args.port : parent.args.aliasport); // Use HTTPS alias port is specified
|
||||
if (parent.args.agentport != null) { agentHttpsPort = parent.args.agentport; } // If an agent only port is enabled, use that.
|
||||
if (parent.args.agentaliasport != null) { agentHttpsPort = parent.args.agentaliasport; } // If an agent alias port is specified, use that.
|
||||
serverinfo.magenturl = 'mc://' + agentServerName + ((agentHttpsPort != 443)?(':' + agentHttpsPort):'') + ((xdomain != '')?('/' + xdomain):'');
|
||||
|
||||
if (domain.guestdevicesharing === false) { serverinfo.guestdevicesharing = false; }
|
||||
if (typeof domain.userconsentflags == 'number') { serverinfo.consent = domain.userconsentflags; }
|
||||
if ((typeof domain.usersessionidletimeout == 'number') && (domain.usersessionidletimeout > 0)) { serverinfo.timeout = (domain.usersessionidletimeout * 60 * 1000); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue