1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
Found an article: https://levelup.gitconnected.com/how-to-resolve-certificate-errors-in-nodejs-app-involving-ssl-calls-781ce48daded
Suggestions are:
- Quick fix: Add rejectUnauthorized on request or ENVIRONMENT setting
- Add CA certificate to request
Add to request:
https.request({
....,
rejectUnauthorized: false,
},
...)
or environment variable:
NODE_TLS_REJECT_UNAUTHORIZED=0
Alternatively and safer solution is CA certificate:
ca: [fs.readFileSync([certificate path])], rejectUnauthorized: true, }```
답변함 2년 전