mirror of https://github.com/node-red/node-red.git
Add support for rejectUnauthorized msg property
commit
161c7d30ca
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue