mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-12 15:33:20 -05:00
Added a bunch of HTTP to HTTPS redirections.
This commit is contained in:
parent
bb4bc55c48
commit
d2bb4e9840
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "meshcentral",
|
||||
"version": "0.3.9-o",
|
||||
"version": "0.3.9-p",
|
||||
"keywords": [
|
||||
"Remote Management",
|
||||
"Intel AMT",
|
||||
|
@ -94,8 +94,12 @@ module.exports.CreateRedirServer = function (parent, db, args, func) {
|
||||
for (var i in parent.config.domains) {
|
||||
if (parent.config.domains[i].dns != null) { continue; }
|
||||
var url = parent.config.domains[i].url;
|
||||
obj.app.get(url, performRedirection);
|
||||
obj.app.get(url, performRedirection); // Root redirection
|
||||
obj.app.use(url + "clickonce", obj.express.static(obj.parent.path.join(__dirname, "public/clickonce"))); // Indicates the clickonce folder is public
|
||||
|
||||
// Setup all of the redirections to HTTPS
|
||||
const redirections = ['terms', 'logout', 'MeshServerRootCert.cer', 'mescript.ashx', 'checkmail', 'agentinvite', 'messenger', 'meshosxagent', 'devicepowerevents.ashx', 'downloadfile.ashx', 'userfiles/*', 'webrelay.ashx', 'health.ashx', 'logo.png', 'welcome.jpg'];
|
||||
for (i in redirections) { obj.app.get(url + redirections[i], performRedirection); }
|
||||
}
|
||||
|
||||
// Find a free port starting with the specified one and going up.
|
||||
|
Loading…
Reference in New Issue
Block a user