我使用nodejs提供的request module向一個https發起請求,遇到下面這個錯誤:
DEPTH_ZERO_SELF_SIGNED_CERT
self signed certificate
解決方案:
在構造http請求時,指定:
strictSSL: false, // allow us to use our self-signed cert for testing
rejectUnauthorized: false
這樣就能忽略掉錯誤:
我使用nodejs提供的request module向一個https發起請求,遇到下面這個錯誤:
DEPTH_ZERO_SELF_SIGNED_CERT
self signed certificate
解決方案:
在構造http請求時,指定:
strictSSL: false, // allow us to use our self-signed cert for testing
rejectUnauthorized: false
這樣就能忽略掉錯誤: