Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 关闭Github Api中的证书验证_Node.js_Github_Github Api - Fatal编程技术网

Node.js 关闭Github Api中的证书验证

Node.js 关闭Github Api中的证书验证,node.js,github,github-api,Node.js,Github,Github Api,我正在使用这个github 我想关闭节点js中该对象发出的所有HTTP请求的证书验证 如何发送,是否需要发送任何特定的标题值才能关闭?您可以尝试: process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0; 但这将使所有请求变得不安全 所以。。。我认为rejectUnauthorized:true是您正在寻找的代理选项 由于node github使用https代理,我认为您必须先设置proxyUrl.rejectUnauthorized=true,然后才能

我正在使用这个github

想关闭节点js中该对象发出的所有HTTP请求的证书验证

如何发送,是否需要发送任何特定的标题值才能关闭?

您可以尝试:

process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0;
但这将使所有请求变得不安全

所以。。。我认为
rejectUnauthorized:true
是您正在寻找的代理选项

由于node github使用https代理,我认为您必须先设置
proxyUrl.rejectUnauthorized=true
,然后才能在构造函数中使用它

,您可以尝试:

process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0;
但这将使所有请求变得不安全

所以。。。我认为
rejectUnauthorized:true
是您正在寻找的代理选项

由于node github使用https代理,我认为在构造函数中使用它之前必须设置
proxyUrl.rejectUnauthorized=true