mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add support for rejectUnauthorized msg property
This commit is contained in:
commit
161c7d30ca
@ -85,6 +85,9 @@
|
|||||||
<dd>If set, can be used to send cookies with the request.</dd>
|
<dd>If set, can be used to send cookies with the request.</dd>
|
||||||
<dt class="optional">payload</dt>
|
<dt class="optional">payload</dt>
|
||||||
<dd>Sent as the body of the request.</dd>
|
<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>
|
</dl>
|
||||||
<h3>Outputs</h3>
|
<h3>Outputs</h3>
|
||||||
<dl class="message-properties">
|
<dl class="message-properties">
|
||||||
|
@ -196,6 +196,10 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
if (tlsNode) {
|
if (tlsNode) {
|
||||||
tlsNode.addTLSOptions(opts);
|
tlsNode.addTLSOptions(opts);
|
||||||
|
} else {
|
||||||
|
if (msg.hasOwnProperty('rejectUnauthorized')) {
|
||||||
|
opts.rejectUnauthorized = msg.rejectUnauthorized;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var req = ((/^https/.test(urltotest))?https:http).request(opts,function(res) {
|
var req = ((/^https/.test(urltotest))?https:http).request(opts,function(res) {
|
||||||
// Force NodeJs to return a Buffer (instead of a string)
|
// Force NodeJs to return a Buffer (instead of a string)
|
||||||
|
Loading…
Reference in New Issue
Block a user