@@ -136,11 +136,13 @@ module.exports = {
136136 * - httpServerOptions
137137 * - httpAdminRoot
138138 * - httpAdminMiddleware
139+ * - httpAdminCookieOptions
139140 * - httpNodeRoot
140141 * - httpNodeCors
141142 * - httpNodeMiddleware
142143 * - httpStatic
143- * - httpStaticRoot
144+ * - httpStaticRoot
145+ * - httpStaticCors
144146 ******************************************************************************/
145147
146148 /** the tcp port that the Node-RED web server is listening on */
@@ -181,10 +183,15 @@ module.exports = {
181183 // next();
182184 // } ,
183185
186+ /** The following property can be used to set addition options on the session
187+ * cookie used as part of adminAuth authentication system
188+ * Available options are documented here: https://www.npmjs.com/package/express-session#cookie
189+ */
190+ // httpAdminCookieOptions: { } ,
184191
185192 /** Some nodes, such as HTTP In, can be used to listen for incoming http requests.
186193 * By default, these are served relative to '/'. The following property
187- * can be used to specifiy a different root path. If set to false, this is
194+ * can be used to specify a different root path. If set to false, this is
188195 * disabled.
189196 */
190197 //httpNodeRoot: '/red-nodes',
@@ -226,10 +233,18 @@ module.exports = {
226233 * to move httpAdminRoot
227234 */
228235 //httpStatic: '/home/nol/node-red-static/', //single static source
229- /* OR multiple static sources can be created using an array of objects... */
236+ /**
237+ * OR multiple static sources can be created using an array of objects...
238+ * Each object can also contain an options object for further configuration.
239+ * See https://expressjs.com/en/api.html#express.static for available options.
240+ * They can also contain an option `cors` object to set specific Cross-Origin
241+ * Resource Sharing rules for the source. `httpStaticCors` can be used to
242+ * set a default cors policy across all static routes.
243+ */
230244 //httpStatic: [
231245 // { path: ' /home/nol/pics/' , root: " /img/" } ,
232246 // { path: ' /home/nol/reports/' , root: " /doc/" } ,
247+ // { path: ' /home/nol/videos/' , root: " /vid/" , options: {maxAge: ' 1d' } }
233248 //],
234249
235250 /**
@@ -242,9 +257,26 @@ module.exports = {
242257 */
243258 //httpStaticRoot: '/static/',
244259
260+ /** The following property can be used to configure cross-origin resource sharing
261+ * in the http static routes.
262+ * See https://github.com/troygoode/node-cors#configuration-options for
263+ * details on its contents. The following is a basic permissive set of options:
264+ */
265+ //httpStaticCors: {
266+ // origin: " *" ,
267+ // methods: " GET,PUT,POST,DELETE"
268+ //} ,
269+
270+ /** The following property can be used to modify proxy options */
271+ // proxyOptions: {
272+ // mode: " legacy" , // legacy mode is for non-strict previous proxy determination logic (node-red < v4 compatible)
273+ // } ,
274+
245275/*******************************************************************************
246276 * Runtime Settings
247277 * - lang
278+ * - runtimeState
279+ * - diagnostics
248280 * - logging
249281 * - contextStorage
250282 * - exportGlobalContextKeys
@@ -257,6 +289,31 @@ module.exports = {
257289 */
258290 // lang: "de",
259291
292+ /** Configure diagnostics options
293+ * - enabled: When `enabled` is `true` (or unset), diagnostics data will
294+ * be available at http://localhost:1880/diagnostics
295+ * - ui: When `ui` is `true` (or unset), the action `show-system-info` will
296+ * be available to logged in users of node-red editor
297+ */
298+ diagnostics: {
299+ /** enable or disable diagnostics endpoint. Must be set to `false ` to disable */
300+ enabled: true ,
301+ /** enable or disable diagnostics display in the node-red editor. Must be set to `false ` to disable */
302+ ui: true ,
303+ } ,
304+ /** Configure runtimeState options
305+ * - enabled: When `enabled` is `true` flows runtime can be Started/Stopped
306+ * by POSTing to available at http://localhost:1880/flows/state
307+ * - ui: When `ui` is `true`, the action `core:start-flows` and
308+ * `core:stop-flows` will be available to logged in users of node-red editor
309+ * Also, the deploy menu (when set to default) will show a stop or start button
310+ */
311+ runtimeState: {
312+ /** enable or disable flows/state endpoint. Must be set to `false ` to disable */
313+ enabled: false ,
314+ /** show or hide runtime stop/start options in the node-red editor. Must be set to `false ` to hide */
315+ ui: false ,
316+ } ,
260317 /** Configure the logging output */
261318 logging: {
262319 /** Only console logging is currently supported */
@@ -308,19 +365,22 @@ module.exports = {
308365 * will install/load. It can use ' *' as a wildcard that matches anything.
309366 */
310367 externalModules: {
311- // autoInstall: false, /** Whether the runtime will attempt to automatically install missing modules */
312- // autoInstallRetry: 30, /** Interval, in seconds, between reinstall attempts */
313- // palette: { /** Configuration for the Palette Manager */
314- // allowInstall: true, /** Enable the Palette Manager in the editor */
315- // allowUpload: true, /** Allow module tgz files to be uploaded and installed */
316- // allowList: [],
317- // denyList: []
318- // },
319- // modules: { /** Configuration for node-specified modules */
320- // allowInstall: true,
321- // allowList: [],
322- // denyList: []
323- // }
368+ // autoInstall: false, /** Whether the runtime will attempt to automatically install missing modules */
369+ // autoInstallRetry: 30, /** Interval, in seconds, between reinstall attempts */
370+ // palette: { /** Configuration for the Palette Manager */
371+ // allowInstall: true, /** Enable the Palette Manager in the editor */
372+ // allowUpdate: true, /** Allow modules to be updated in the Palette Manager */
373+ // allowUpload: true, /** Allow module tgz files to be uploaded and installed */
374+ // allowList: [' *' ],
375+ // denyList: [],
376+ // allowUpdateList: [' *' ],
377+ // denyUpdateList: []
378+ // },
379+ // modules: { /** Configuration for node-specified modules */
380+ // allowInstall: true,
381+ // allowList: [],
382+ // denyList: []
383+ // }
324384 },
325385
326386
@@ -346,6 +406,12 @@ module.exports = {
346406 * a collection of themes to chose from.
347407 */
348408 {{^editorTheme}}//{{/editorTheme}}theme: "{{editorTheme}}",
409+
410+ /** To disable the ' Welcome to Node-RED' tour that is displayed the first
411+ * time you access the editor for each release of Node-RED, set this to false
412+ */
413+ //tours: false,
414+
349415 palette: {
350416 /** The following property can be used to order the categories in the editor
351417 * palette. If a node' s category is not in the list, the category will get
@@ -367,6 +433,7 @@ module.exports = {
367433 mode: " {{projects.workflow}}"
368434 }
369435 },
436+
370437 codeEditor: {
371438 /** Select the text editor component used by the editor.
372439 * As of Node-RED V3, this defaults to " monaco" , but can be set to " ace" if desired
@@ -387,7 +454,19 @@ module.exports = {
387454 //fontFamily: " Cascadia Code, Fira Code, Consolas, 'Courier New', monospace" ,
388455 //fontLigatures: true ,
389456 }
390- }
457+ },
458+ markdownEditor: {
459+ mermaid: {
460+ /** enable or disable mermaid diagram in markdown document
461+ */
462+ enabled: true
463+ }
464+ },
465+
466+ multiplayer: {
467+ /** To enable the Multiplayer feature, set this value to true */
468+ enabled: false
469+ } ,
391470 },
392471
393472/*******************************************************************************
@@ -400,6 +479,7 @@ module.exports = {
400479 * - ui (for use with Node-RED Dashboard)
401480 * - debugUseColors
402481 * - debugMaxLength
482+ * - debugStatusLength
403483 * - execMaxBufferSize
404484 * - httpRequestTimeout
405485 * - mqttReconnectTime
@@ -455,6 +535,9 @@ module.exports = {
455535 /** The maximum length, in characters, of any message sent to the debug sidebar tab */
456536 debugMaxLength: 1000,
457537
538+ /** The maximum length, in characters, of status messages under the debug node */
539+ //debugStatusLength: 32,
540+
458541 /** Maximum buffer size for the exec node. Defaults to 10Mb */
459542 //execMaxBufferSize: 10000000,
460543
@@ -488,7 +571,7 @@ module.exports = {
488571 */
489572 //tlsConfigDisableLocalFiles: true,
490573
491- /** The following property can be used to verify websocket connection attempts.
574+ /** The following property can be used to verify WebSocket connection attempts.
492575 * This allows, for example, the HTTP request headers to be checked to ensure
493576 * they include valid authentication information.
494577 */
0 commit comments