diff --git a/nodes/core/io/21-httprequest.html b/nodes/core/io/21-httprequest.html
index 03cf5b73e..5c57d47e9 100644
--- a/nodes/core/io/21-httprequest.html
+++ b/nodes/core/io/21-httprequest.html
@@ -85,6 +85,9 @@
If set, can be used to send cookies with the request.
payload
Sent as the body of the request.
+ rejectUnauthorized
+ If set to true
, allows requests to be made to https sites that use
+ self signed certificates.
Outputs
diff --git a/nodes/core/io/21-httprequest.js b/nodes/core/io/21-httprequest.js
index 5d6fea41b..1a3707344 100644
--- a/nodes/core/io/21-httprequest.js
+++ b/nodes/core/io/21-httprequest.js
@@ -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)