mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Rename insecureRedirect to requireHttps
This commit is contained in:
		@@ -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) {
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user