2017-08-19 6 views
1

私はこのgithubを使用していますapiGithub Apiの偽薬の検証を無効にする

var github = new GitHubApi({ 
    // optional 
    debug: true, 
    protocol: "http", 
    host: "github.my-GHE-enabled-company.com", // should be api.github.com for GitHub 
    pathPrefix: "/api/v3", // for some GHEs; none for GitHub 
    headers: { 
     "user-agent": "My-Cool-GitHub-App" // GitHub is happy with a unique user agent 
    }, 
    Promise: require('bluebird'), 
    followRedirects: false, // default: true; there's currently an issue with non-get redirects, so allow ability to disable follow-redirects 
    timeout: 5000 
}); 

私は、ノードのjsに、このオブジェクトから起こってすべてのHTTP要求に証明書の検証をオフにしたい

どのように送信するには、特定のヘッダー値をオフに送信する必要がありますか?

答えて

0

あなたは試すことができます:

process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0; 

しかし、これはALL要求安全でない

を行いますので...私はrejectUnauthorized:trueは、あなたが探しているエージェントのオプションだと思います。ノード-githubのは、HTTPSプロキシエージェントを使用しているため

は、私はあなたがそのコンストラクタで使用される前にproxyUrl.rejectUnauthorized = trueを設定しなければならないと思うat line 666

関連する問題