1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Rename insecureRedirect to requireHttps

This commit is contained in:
Nick O'Leary 2016-11-16 14:24:27 +00:00
parent 6e9e694f66
commit 6efd048fd6
2 changed files with 4 additions and 4 deletions

View File

@ -87,7 +87,7 @@ function init(_server,_runtime) {
if (!settings.disableEditor) { if (!settings.disableEditor) {
ui.init(runtime); ui.init(runtime);
var editorApp = express(); var editorApp = express();
if (settings.insecureRedirect) { if (settings.requireHttps === true) {
editorApp.enable('trust proxy'); editorApp.enable('trust proxy');
editorApp.use(function (req, res, next) { editorApp.use(function (req, res, next) {
if (req.secure) { if (req.secure) {

View File

@ -129,9 +129,9 @@ module.exports = {
// cert: fs.readFileSync('certificate.pem') // cert: fs.readFileSync('certificate.pem')
//}, //},
// The following property can be used to cause insecure HTTP connections to be redirected // The following property can be used to cause insecure HTTP connections to
// to HTTPS. // be redirected to HTTPS.
//insecureRedirect: false //requireHttps: true
// The following property can be used to disable the editor. The admin API // 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 // is not affected by this option. To disable both the editor and the admin