我正在尝试使用node-red作为前端来与我正在构建的 REST API 交互。我的 API 使用 https,但在我的本地服务器上,证书没有完美设置,当我尝试使用“http 请求”节点时出现错误:
UNABLE_TO_VERIFY_LEAF_SIGNATURE
有没有办法将 node-red 配置得不那么严格并允许 SSL 协议错误并继续处理 http 请求?有没有人创建了他们自己版本的“http 请求”节点,它比默认的更严格?
(在 Google Chome 浏览器中,我有一个绿色挂锁,所以 SSL 几乎是正确的,node-red 非常挑剔)
要运行 node-red,我使用 docker:
docker run -dp 1880:1880 -v ~/.node-red:/root/.node-red --name node-red cpswan/node-red
这是我的节点红色项目源代码:
[{"id":"e246fcb9.1db9","type":"inject","name":"Trigger user/me","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":200,"y":140,"z":"e7bac913.184538","wires":[["f9d78108.06288"]]},{"id":"96b8b92c.694748","type":"http request","name":"user/me","method":"GET","ret":"obj","url":"https://local.supertasker.com/api/user/me","x":711,"y":141,"z":"e7bac913.184538","wires":[["5150419b.aeafc"]]},{"id":"5150419b.aeafc","type":"debug","name":"","active":true,"console":"false","complete":"false","x":906,"y":140,"z":"e7bac913.184538","wires":[]},{"id":"f9d78108.06288","type":"function","name":"Add 'Accept:application/json' header","func":"\nmsg.headers = {\n 'Accept':'application/json'\n};\n\n// Return the message so it can be sent on\nreturn msg;","outputs":1,"valid":true,"x":464,"y":140,"z":"e7bac913.184538","wires":[["96b8b92c.694748"]]}]