mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Put in the groundwork for web relay with multiple relay DNS names.
This commit is contained in:
parent
1bec66a241
commit
a0ea6ead09
4 changed files with 25 additions and 19 deletions
|
@ -1649,8 +1649,12 @@ function CreateMeshCentralServer(config, args) {
|
|||
obj.webserver = require('./webserver.js').CreateWebServer(obj, obj.db, obj.args, obj.certificates, obj.StartEx5);
|
||||
if (obj.redirserver != null) { obj.redirserver.hookMainWebServer(obj.certificates); }
|
||||
|
||||
// Change RelayDNS to a array of strings
|
||||
if (typeof obj.args.relaydns == 'string') { obj.args.relaydns = [obj.args.relaydns]; }
|
||||
if (obj.common.validateStrArray(obj.args.relaydns, 1) == false) { delete obj.args.relaydns; }
|
||||
|
||||
// Start the HTTP relay web server if needed
|
||||
if ((typeof obj.args.relaydns != 'string') && (typeof obj.args.relayport == 'number') && (obj.args.relayport != 0)) {
|
||||
if ((obj.args.relaydns != null) && (typeof obj.args.relayport == 'number') && (obj.args.relayport != 0)) {
|
||||
obj.webrelayserver = require('./webrelayserver.js').CreateWebRelayServer(obj, obj.db, obj.args, obj.certificates, function () { });
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue