SSL Error in nodejs

后端 未结 3 951
一整个雨季
一整个雨季 2020-12-14 12:36

I\'m trying to get a webpage via node https.request(). Doing so results in an error getting logged by my code. Using the node request module has the same result:

3条回答
  •  星月不相逢
    2020-12-14 12:57

    In case website uses ECDH curve, for me the issue resolved only by adding this option:

    request({ url, agentOptions: {
                ecdhCurve: 'P-521:P-384:P-256',
    },(err,res,body) => {
    

    JFYI, May be this will help someone.

提交回复
热议问题