From 6efd048fd695cd553f0297da6f852d0356dac85a Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 16 Nov 2016 14:24:27 +0000 Subject: [PATCH] Rename insecureRedirect to requireHttps --- red/api/index.js | 2 +- settings.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/red/api/index.js b/red/api/index.js index 01eee65a3..5ee778124 100644 --- a/red/api/index.js +++ b/red/api/index.js @@ -87,7 +87,7 @@ function init(_server,_runtime) { if (!settings.disableEditor) { ui.init(runtime); var editorApp = express(); - if (settings.insecureRedirect) { + if (settings.requireHttps === true) { editorApp.enable('trust proxy'); editorApp.use(function (req, res, next) { if (req.secure) { diff --git a/settings.js b/settings.js index 186352733..ad6980afb 100644 --- a/settings.js +++ b/settings.js @@ -129,9 +129,9 @@ module.exports = { // cert: fs.readFileSync('certificate.pem') //}, - // The following property can be used to cause insecure HTTP connections to be redirected - // to HTTPS. - //insecureRedirect: false + // The following property can be used to cause insecure HTTP connections to + // be redirected to HTTPS. + //requireHttps: true // The following property can be used to disable the editor. The admin API // is not affected by this option. To disable both the editor and the admin