node.js - Undefine globals in particular files -
i working on plugin system sails.js application. security reasons need rid of sails
global variable, holds data config files' content, etc. don't want undefine globally, since break application.
plugin's entry point following:
module.exports = function (pluginmanager) { return { ... } }
where pluginmanager
allowed reference application's code.
is possible execute plugin's code in sandbox-like isolated environment? considered using child_process
api, don't know how affect performance , stability of application.
in globals.js set sails instance false, like:
sails: true
still, still access globals via req._sails.
Comments
Post a Comment