fix meshaction with foldr based domains #6436
Signed-off-by: si458 <simonsmith5521@gmail.com>
si458 committed
Oct 8, 2024 at 08:51 UTC
590166f8471dd317400c9b215d5f6387e8daebd3
1 file changed
+1
-1
webserver.js
+1
-1
@@ -5665,7 +5665,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
5665
if (user != null) { meshaction.username = user.name; }
5666
if (req.query.key != null) { meshaction.loginKey = req.query.key; }
5667
var httpsPort = ((obj.args.aliasport == null) ? obj.args.port : obj.args.aliasport); // Use HTTPS alias port is specified
5668
- if (obj.args.lanonly != true) { meshaction.serverUrl = 'wss://' + obj.getWebServerName(domain, req) + ':' + httpsPort + '/' + ((domain.id == '') ? '' : ('/' + domain.id)) + 'meshrelay.ashx'; }
5668
+ if (obj.args.lanonly != true) { meshaction.serverUrl = 'wss://' + obj.getWebServerName(domain, req) + ':' + httpsPort + '/' + ((domain.id == '') ? '' : (domain.id + '/')) + 'meshrelay.ashx'; }
5669
5670
setContentDispositionHeader(res, 'application/octet-stream', 'meshaction.txt', null, 'meshaction.txt');
5671
res.send(JSON.stringify(meshaction, null, ' '));