@@ -136,11 +136,13 @@ module.exports = {
136
136
* - httpServerOptions
137
137
* - httpAdminRoot
138
138
* - httpAdminMiddleware
139
+ * - httpAdminCookieOptions
139
140
* - httpNodeRoot
140
141
* - httpNodeCors
141
142
* - httpNodeMiddleware
142
143
* - httpStatic
143
- * - httpStaticRoot
144
+ * - httpStaticRoot
145
+ * - httpStaticCors
144
146
******************************************************************************/
145
147
146
148
/** the tcp port that the Node-RED web server is listening on */
@@ -181,10 +183,15 @@ module.exports = {
181
183
// next();
182
184
// } ,
183
185
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: { } ,
184
191
185
192
/** Some nodes, such as HTTP In, can be used to listen for incoming http requests.
186
193
* 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
188
195
* disabled.
189
196
*/
190
197
//httpNodeRoot: '/red-nodes',
@@ -226,10 +233,18 @@ module.exports = {
226
233
* to move httpAdminRoot
227
234
*/
228
235
//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
+ */
230
244
//httpStatic: [
231
245
// { path: ' /home/nol/pics/' , root: " /img/" } ,
232
246
// { path: ' /home/nol/reports/' , root: " /doc/" } ,
247
+ // { path: ' /home/nol/videos/' , root: " /vid/" , options: {maxAge: ' 1d' } }
233
248
//],
234
249
235
250
/**
@@ -242,9 +257,26 @@ module.exports = {
242
257
*/
243
258
//httpStaticRoot: '/static/',
244
259
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
+
245
275
/*******************************************************************************
246
276
* Runtime Settings
247
277
* - lang
278
+ * - runtimeState
279
+ * - diagnostics
248
280
* - logging
249
281
* - contextStorage
250
282
* - exportGlobalContextKeys
@@ -257,6 +289,31 @@ module.exports = {
257
289
*/
258
290
// lang: "de",
259
291
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
+ } ,
260
317
/** Configure the logging output */
261
318
logging: {
262
319
/** Only console logging is currently supported */
@@ -308,19 +365,22 @@ module.exports = {
308
365
* will install/load. It can use ' *' as a wildcard that matches anything.
309
366
*/
310
367
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
+ // }
324
384
},
325
385
326
386
@@ -346,6 +406,12 @@ module.exports = {
346
406
* a collection of themes to chose from.
347
407
*/
348
408
{{^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
+
349
415
palette: {
350
416
/** The following property can be used to order the categories in the editor
351
417
* palette. If a node' s category is not in the list, the category will get
@@ -367,6 +433,7 @@ module.exports = {
367
433
mode: " {{projects.workflow}}"
368
434
}
369
435
},
436
+
370
437
codeEditor: {
371
438
/** Select the text editor component used by the editor.
372
439
* As of Node-RED V3, this defaults to " monaco" , but can be set to " ace" if desired
@@ -387,7 +454,19 @@ module.exports = {
387
454
//fontFamily: " Cascadia Code, Fira Code, Consolas, 'Courier New', monospace" ,
388
455
//fontLigatures: true ,
389
456
}
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
+ } ,
391
470
},
392
471
393
472
/*******************************************************************************
@@ -400,6 +479,7 @@ module.exports = {
400
479
* - ui (for use with Node-RED Dashboard)
401
480
* - debugUseColors
402
481
* - debugMaxLength
482
+ * - debugStatusLength
403
483
* - execMaxBufferSize
404
484
* - httpRequestTimeout
405
485
* - mqttReconnectTime
@@ -455,6 +535,9 @@ module.exports = {
455
535
/** The maximum length, in characters, of any message sent to the debug sidebar tab */
456
536
debugMaxLength: 1000,
457
537
538
+ /** The maximum length, in characters, of status messages under the debug node */
539
+ //debugStatusLength: 32,
540
+
458
541
/** Maximum buffer size for the exec node. Defaults to 10Mb */
459
542
//execMaxBufferSize: 10000000,
460
543
@@ -488,7 +571,7 @@ module.exports = {
488
571
*/
489
572
//tlsConfigDisableLocalFiles: true,
490
573
491
- /** The following property can be used to verify websocket connection attempts.
574
+ /** The following property can be used to verify WebSocket connection attempts.
492
575
* This allows, for example, the HTTP request headers to be checked to ensure
493
576
* they include valid authentication information.
494
577
*/
0 commit comments