From 1ab01fb1fe800593024ea58d75c560ff3924dbb0 Mon Sep 17 00:00:00 2001 From: Claudio Mignanti Date: Sun, 16 Dec 2018 11:46:13 +0100 Subject: [PATCH] Fix bug introduced in 4a9433337e3 --- settings.js | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/settings.js b/settings.js index 402428d..1475383 100644 --- a/settings.js +++ b/settings.js @@ -1,25 +1,17 @@ -module.exports = function () { - - var obj = { - uiPort: process.env.PORT || 5000, - userDir: ".nodered/", - flowFile: "flows.json", - credentialSecret: process.env.SECRET || false, - editorTheme: { - page: { - css: "/app/css/node-red.css" - }, - header: { - "title": process.env.TITLE || "Docker node-red", - "image": null, - "url": "#" - } +module.exports = { + uiPort: process.env.PORT || 5000, + userDir: ".nodered/", + flowFile: "flows.json", + credentialSecret: process.env.SECRET || false, + adminAuth: process.env.AUTH_METHOD ? require('./settings_' + process.env.AUTH_METHOD + '.js') : require('./settings.js'), + editorTheme: { + page: { + css: "/app/css/node-red.css" + }, + header: { + "title": process.env.TITLE || "Docker node-red", + "image": null, + "url": "#" } } - if (process.env.AUTH_METHOD && process.env.AUTH_METHOD !== 'noauth') - obj['adminAuth']= require('./settings_' + process.env.AUTH_METHOD + '.js') - - return obj } - -