mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 11:01:52 +00:00
Fix for web relay using ports.
This commit is contained in:
parent
e1a6091f94
commit
bcc2a8607e
2 changed files with 2 additions and 2 deletions
|
@ -1654,7 +1654,7 @@ function CreateMeshCentralServer(config, args) {
|
||||||
if (obj.common.validateStrArray(obj.args.relaydns, 1) == false) { delete obj.args.relaydns; }
|
if (obj.common.validateStrArray(obj.args.relaydns, 1) == false) { delete obj.args.relaydns; }
|
||||||
|
|
||||||
// Start the HTTP relay web server if needed
|
// Start the HTTP relay web server if needed
|
||||||
if ((obj.args.relaydns != null) && (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 () { });
|
obj.webrelayserver = require('./webrelayserver.js').CreateWebRelayServer(obj, obj.db, obj.args, obj.certificates, function () { });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ module.exports.CreateWebRelayServer = function (parent, db, args, certificates,
|
||||||
// Setup a keygrip instance with higher default security, default hash is SHA1, we want to bump that up with SHA384
|
// Setup a keygrip instance with higher default security, default hash is SHA1, we want to bump that up with SHA384
|
||||||
// If multiple instances of this server are behind a load-balancer, this secret must be the same for all instances
|
// If multiple instances of this server are behind a load-balancer, this secret must be the same for all instances
|
||||||
// If args.sessionkey is a string, use it as a single key, but args.sessionkey can also be used as an array of keys.
|
// If args.sessionkey is a string, use it as a single key, but args.sessionkey can also be used as an array of keys.
|
||||||
const keygrip = require('keygrip')((typeof obj.args.sessionkey == 'string') ? [obj.args.sessionkey] : obj.args.sessionkey, 'sha384', 'base64');
|
const keygrip = require('keygrip')((typeof args.sessionkey == 'string') ? [args.sessionkey] : args.sessionkey, 'sha384', 'base64');
|
||||||
|
|
||||||
// Setup cookie session
|
// Setup cookie session
|
||||||
const sessionOptions = {
|
const sessionOptions = {
|
||||||
|
|
Loading…
Reference in a new issue