ionic 3/node.js-证书链中的自签名证书(如何禁用strict-ssl?) [英] ionic 3 / node.js - Self signed certificate in certificate chain (how to disable strict-ssl?)
本文介绍了ionic 3/node.js-证书链中的自签名证书(如何禁用strict-ssl?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
由于以下错误,我无法使用ionic start
创建离子项目:
I cannot create a ionic project with ionic start
because of following error:
Error: self signed certificate in certificate chain
at TLSSocket.<anonymous> (_tls_wrap.js:1103:38)
at emitNone (events.js:106:13)
at TLSSocket.emit (events.js:208:7)
at TLSSocket._finishInit (_tls_wrap.js:637:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:467:38)
在cmd上:ionic start myApp tabs
因为我们的代理会为所有站点发送一个自签名的签名. (FortiNet的FortiGate)
Because our proxy sends a self-signed signature for all sites. (FortiGate of FortiNet)
在npm中,我将strict-ssl
设置为false
并可以正常工作.但是ionic会通过节点应用程序加载内容,对吧?
In npm I set strict-ssl
to false
and works fine. But ionic loads the content over a node application, right?
如何设置节点以忽略所有节点应用程序的自签名证书,或者如何针对离子禁用它?
How to setup node to ignore self signed certificates for all node applications or how to disable it for ionic?
ionic info
@ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
System:
Node : v8.9.1
npm : 5.5.1
OS : Windows 10
Misc:
backend : legacy
推荐答案
我使用以下方法解决了我的问题:
I resolved my problem using:
set NODE_TLS_REJECT_UNAUTHORIZED=0
这篇关于ionic 3/node.js-证书链中的自签名证书(如何禁用strict-ssl?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文