无法验证叶子签名 [英] Unable to verify leaf signature
问题描述
我正在使用 node.js request.js 来访问 api.我收到此错误
I'm using node.js request.js to reach an api. I'm getting this error
[错误:UNABLE_TO_VERIFY_LEAF_SIGNATURE]
[Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE]
我的所有凭据都是准确有效的,服务器也很好.我向邮递员提出了同样的要求.
All of my credentials are accurate and valid, and the server's fine. I made the same request with postman.
request({
"url": domain+"/api/orders/originator/"+id,
"method": "GET",
"headers":{
"X-API-VERSION": 1,
"X-API-KEY": key
},
}, function(err, response, body){
console.log(err);
console.log(response);
console.log(body);
});
这段代码只是在一个可执行脚本中运行.node ./run_file.js
,这是为什么呢?是否需要在服务器上运行?
This code is just running in an executable script ex. node ./run_file.js
, Is that why? Does it need to run on a server?
推荐答案
注意:以下内容是危险的,会导致 API 内容在客户端和服务器之间被拦截和修改.
Note: the following is dangerous, and will allow API content to be intercepted and modified between the client and the server.
这也有效
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';
这篇关于无法验证叶子签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!