Skip to content

Commit

Permalink
Deprecate use of httpRoot in settings and add warning
Browse files Browse the repository at this point in the history
(no change is actual behaviour yet - just warning)
Should we remove option from settings ? or just label it ?
  • Loading branch information
Dave Conway-Jones committed Apr 23, 2021
1 parent dd12572 commit fdd0a93
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions packages/node_modules/@node-red/runtime/lib/index.js
Expand Up @@ -181,6 +181,9 @@ function start() {
if (settings.settingsFile) {
log.info(log._("runtime.paths.settings",{path:settings.settingsFile}));
}
if (settings.httpRoot !== undefined) {
log.warn(log._("server.httproot-deprecated"));
}
if (settings.httpStatic) {
log.info(log._("runtime.paths.httpStatic",{path:path.resolve(settings.httpStatic)}));
}
Expand Down
Expand Up @@ -42,15 +42,16 @@
"uninstall-failed-long": "Uninstall of module __name__ failed:",
"uninstalled": "Uninstalled module: __name__"
},
"deprecatedOption": "Use of __old__ is deprecated. Use __new__ instead",
"deprecatedOption": "Use of __old__ is DEPRECATED. Use __new__ instead",
"unable-to-listen": "Unable to listen on __listenpath__",
"port-in-use": "Error: port in use",
"uncaught-exception": "Uncaught Exception:",
"admin-ui-disabled": "Admin UI disabled",
"now-running": "Server now running at __listenpath__",
"failed-to-start": "Failed to start server:",
"headless-mode": "Running in headless mode",
"httpadminauth-deprecated": "use of httpAdminAuth is deprecated. Use adminAuth instead",
"httpadminauth-deprecated": "Use of httpAdminAuth is DEPRECATED. Use adminAuth instead",
"httproot-deprecated": "Use of httpRoot is DEPRECATED. Use httpNodeRoot and httpAdminRoot instead",
"https": {
"refresh-interval": "Refreshing https settings every __interval__ hours",
"settings-refreshed": "Server https settings have been refreshed",
Expand Down
2 changes: 1 addition & 1 deletion packages/node_modules/node-red/settings.js
Expand Up @@ -96,7 +96,7 @@ module.exports = {
// disabled.
//httpNodeRoot: '/red-nodes',

// The following property can be used in place of 'httpAdminRoot' and 'httpNodeRoot',
// **DEPRECATED** The following property can be used in place of 'httpAdminRoot' and 'httpNodeRoot',
// to apply the same root to both parts.
//httpRoot: '/red',

Expand Down

0 comments on commit fdd0a93

Please sign in to comment.