SSL Error in nodejs

后端 未结 3 952
一整个雨季
一整个雨季 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:53

    We hit the same problem. By default, request uses the https.globalAgent. So we added the code near the top of our script.

    var https = require('https');
    https.globalAgent.options.secureProtocol = 'SSLv3_method';
    

    All of a sudden everything worked.

提交回复
热议问题