mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Add support for rejectUnauthorized msg property
This commit is contained in:
		| @@ -85,6 +85,9 @@ | ||||
|         <dd>If set, can be used to send cookies with the request.</dd> | ||||
|         <dt class="optional">payload</dt> | ||||
|         <dd>Sent as the body of the request.</dd> | ||||
|         <dt class="optional">rejectUnauthorized</dt> | ||||
|         <dd>If set to <code>true</code>, allows requests to be made to https sites that use | ||||
|             self signed certificates.</dd> | ||||
|     </dl> | ||||
|     <h3>Outputs</h3> | ||||
|     <dl class="message-properties"> | ||||
|   | ||||
| @@ -196,6 +196,10 @@ module.exports = function(RED) { | ||||
|             } | ||||
|             if (tlsNode) { | ||||
|                 tlsNode.addTLSOptions(opts); | ||||
|             } else { | ||||
|                 if (msg.hasOwnProperty('rejectUnauthorized')) { | ||||
|                     opts.rejectUnauthorized = msg.rejectUnauthorized; | ||||
|                 } | ||||
|             } | ||||
|             var req = ((/^https/.test(urltotest))?https:http).request(opts,function(res) { | ||||
|                 // Force NodeJs to return a Buffer (instead of a string) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user