mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-07 12:52:54 -05:00
Add hook to allow adding custom api endpoints to Express routing
This commit is contained in:
@@ -6341,6 +6341,9 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
||||
}
|
||||
|
||||
// Setup all HTTP handlers
|
||||
if (parent.parent.pluginHandler != null) {
|
||||
parent.parent.pluginHandler.callHook('hook_setupHttpHandlers', obj, parent);
|
||||
}
|
||||
if (parent.multiServer != null) { obj.app.ws('/meshserver.ashx', function (ws, req) { parent.multiServer.CreatePeerInServer(parent.multiServer, ws, req, obj.args.tlsoffload == null); }); }
|
||||
for (var i in parent.config.domains) {
|
||||
if ((parent.config.domains[i].dns != null) || (parent.config.domains[i].share != null)) { continue; } // This is a subdomain with a DNS name, no added HTTP bindings needed.
|
||||
|
||||
Reference in New Issue
Block a user