Error: unable to verify the first certificate in Node-Red
Error: unable to verify the first certificate in Node-Red
我正在尝试以简单的 Node-Red 流程调用 RESTful 服务(在我的域之外)。
流程如下图所示:
调用服务的函数:
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;
尽管如此,我收到以下错误:
"Error: unable to verify the first certificate : https://myserviceip/myendpoint/mymethod"
将 header 中的 msg.rejectUnauthorized 设置为 false 无效。
msg.rejectUnauthorized = false; // to avoid the error but it does not work
查看了 http-request 节点后,我认为目前基于传入消息中的标志不可能,但可以在节点编辑器中完成。双击 http-request 节点,然后勾选 "Enable secure (SSL/TLS) connection" 复选框。接下来创建一个新的 TLS 配置,然后取消选中 "Verify server certificate" 复选框。
保存所有这些,它应该可以工作
不过话虽如此,我认为更新 http-request 节点以支持 msg.rejectUnauthorized
并不难。我将考虑在 (https://github.com/node-red/node-red/pull/1207).
中添加拉取请求
我正在尝试以简单的 Node-Red 流程调用 RESTful 服务(在我的域之外)。
流程如下图所示:
调用服务的函数:
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;
尽管如此,我收到以下错误:
"Error: unable to verify the first certificate : https://myserviceip/myendpoint/mymethod"
将 header 中的 msg.rejectUnauthorized 设置为 false 无效。
msg.rejectUnauthorized = false; // to avoid the error but it does not work
查看了 http-request 节点后,我认为目前基于传入消息中的标志不可能,但可以在节点编辑器中完成。双击 http-request 节点,然后勾选 "Enable secure (SSL/TLS) connection" 复选框。接下来创建一个新的 TLS 配置,然后取消选中 "Verify server certificate" 复选框。
保存所有这些,它应该可以工作
不过话虽如此,我认为更新 http-request 节点以支持 msg.rejectUnauthorized
并不难。我将考虑在 (https://github.com/node-red/node-red/pull/1207).