[英]ionic 3 / node.js - Self signed certificate in certificate chain (how to disable strict-ssl?)
I cannot create a ionic project with ionic start
because of following error: 由于以下错误,我无法使用
ionic start
创建离子项目:
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)
on cmd: ionic start myApp tabs
在cmd:
ionic start myApp tabs
Because our proxy sends a self-signed signature for all sites. 因为我们的代理会为所有网站发送自签名签名。 (FortiGate of FortiNet)
(FortiNet的FortiGate)
In npm I set strict-ssl
to false
and works fine. 在npm我将
strict-ssl
设置为false
并且工作正常。 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
我使用以下方法解决了问题
set NODE_TLS_REJECT_UNAUTHORIZED=0
Setting set NODE_TLS_REJECT_UNAUTHORIZED=0
comes at a great risk to the security of your application. 设置
set NODE_TLS_REJECT_UNAUTHORIZED=0
应用程序的安全性带来很大的风险。 I would recommend avoiding this "work around" for production software. 我建议避免为生产软件“解决”这个问题。 I recommend reading this before disabling.
我建议在禁用之前阅读此内容。
I'm still trying to fix my own issue and will update if I come up with a safer solution. 我仍在尝试解决自己的问题,如果我想出一个更安全的解决方案,我会更新。
我通过禁用我的防病毒软件来修复它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.