admin管理员组文章数量:1022804
I am trying to call RESTful service (out side of my domain) in a simple Node-Red flow.
The flow is illustrated in the following diagram:
The function for calling the service:
var data = {};
data[“someparameter”] = “somevalue”;
msg.method = "POST";
msg.headers = { "Content-Type": "application/json" };
msg.payload = JSON.stringify(data);
msg.url = "https://myserviceip/myendpoint/mymethod”;
return msg;
Nonetheless i get the following error:
"Error: unable to verify the first certificate : https://myserviceip/myendpoint/mymethod"
Setting the msg.rejectUnauthorized in the header to false did not work.
msg.rejectUnauthorized = false; // to avoid the error but it does not work
I am trying to call RESTful service (out side of my domain) in a simple Node-Red flow.
The flow is illustrated in the following diagram:
The function for calling the service:
var data = {};
data[“someparameter”] = “somevalue”;
msg.method = "POST";
msg.headers = { "Content-Type": "application/json" };
msg.payload = JSON.stringify(data);
msg.url = "https://myserviceip/myendpoint/mymethod”;
return msg;
Nonetheless i get the following error:
"Error: unable to verify the first certificate : https://myserviceip/myendpoint/mymethod"
Setting the msg.rejectUnauthorized in the header to false did not work.
msg.rejectUnauthorized = false; // to avoid the error but it does not work
Share
Improve this question
edited Mar 23, 2017 at 19:00
Bashar Altakrouri
asked Mar 23, 2017 at 18:01
Bashar AltakrouriBashar Altakrouri
10.6k1 gold badge42 silver badges55 bronze badges
2
- 1 More information is required here, I assume the function node is feeding into a http-request node? – hardillb Commented Mar 23, 2017 at 18:17
- Thanks @hardill, as requested the flow is added – Bashar Altakrouri Commented Mar 23, 2017 at 19:01
1 Answer
Reset to default 5Having had a look at the http-request node I don't think it's possible at the moment based on a flag in the ining message, but it can be done in the node editor. Double click on the http-request node, then tick the "Enable secure (SSL/TLS) connection" checkbox. Next create a new TLS Config and then uncheck the "Verify server certificate" checkbox.
Save all that and it should work
But having said that I don't think it would be that hard to update the http-request node to support the msg.rejectUnauthorized
. I'll look at sticking a pull request in (https://github./node-red/node-red/pull/1207).
I am trying to call RESTful service (out side of my domain) in a simple Node-Red flow.
The flow is illustrated in the following diagram:
The function for calling the service:
var data = {};
data[“someparameter”] = “somevalue”;
msg.method = "POST";
msg.headers = { "Content-Type": "application/json" };
msg.payload = JSON.stringify(data);
msg.url = "https://myserviceip/myendpoint/mymethod”;
return msg;
Nonetheless i get the following error:
"Error: unable to verify the first certificate : https://myserviceip/myendpoint/mymethod"
Setting the msg.rejectUnauthorized in the header to false did not work.
msg.rejectUnauthorized = false; // to avoid the error but it does not work
I am trying to call RESTful service (out side of my domain) in a simple Node-Red flow.
The flow is illustrated in the following diagram:
The function for calling the service:
var data = {};
data[“someparameter”] = “somevalue”;
msg.method = "POST";
msg.headers = { "Content-Type": "application/json" };
msg.payload = JSON.stringify(data);
msg.url = "https://myserviceip/myendpoint/mymethod”;
return msg;
Nonetheless i get the following error:
"Error: unable to verify the first certificate : https://myserviceip/myendpoint/mymethod"
Setting the msg.rejectUnauthorized in the header to false did not work.
msg.rejectUnauthorized = false; // to avoid the error but it does not work
Share
Improve this question
edited Mar 23, 2017 at 19:00
Bashar Altakrouri
asked Mar 23, 2017 at 18:01
Bashar AltakrouriBashar Altakrouri
10.6k1 gold badge42 silver badges55 bronze badges
2
- 1 More information is required here, I assume the function node is feeding into a http-request node? – hardillb Commented Mar 23, 2017 at 18:17
- Thanks @hardill, as requested the flow is added – Bashar Altakrouri Commented Mar 23, 2017 at 19:01
1 Answer
Reset to default 5Having had a look at the http-request node I don't think it's possible at the moment based on a flag in the ining message, but it can be done in the node editor. Double click on the http-request node, then tick the "Enable secure (SSL/TLS) connection" checkbox. Next create a new TLS Config and then uncheck the "Verify server certificate" checkbox.
Save all that and it should work
But having said that I don't think it would be that hard to update the http-request node to support the msg.rejectUnauthorized
. I'll look at sticking a pull request in (https://github./node-red/node-red/pull/1207).
本文标签: javascriptError unable to verify the first certificate in NodeRedStack Overflow
版权声明:本文标题:javascript - Error: unable to verify the first certificate in Node-Red - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745569391a2156645.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论