问题描述
我正在尝试遵循本指南 https://angular.io/guide/setup-local .我安装了node.js和angular cli并构建了默认应用程序:
I'm trying to follow this guide https://angular.io/guide/setup-local. I installed node.js and angular cli and build default app:
ng new my-app
现在我要启动应用程序:
Now i want to start app:
cd my-app
ng serve --open
开始正常:
** Angular Live Development Server is listening on localhost:4200, open your browser on https://localhost:4200/ **
i 「wdm」: Compiled successfully.
但是当我在Chrome中打开页面时,它是隐私错误
But when i open page in Chrome it is privacy error
当我尝试在Firefox中打开它时,一切都很好.我试图用下一条命令启动应用程序:
When i tried to open it in Firefox it all work great.I tried to start app with next command:
ng serve --open --ssl true
仍然是相同的错误.有什么帮助吗?此时,我不需要https,我只想能够在Chrome中打开我的应用.
Still the same error.Any help? At this point i don't need https, i just want to be able to open my app in Chrome.
+
我发布了错误的错误代码.我得到这个:ERR_SSL_PROTOCOL_ERROR
I posted wrong error code. I get this: ERR_SSL_PROTOCOL_ERROR
推荐答案
打开 chrome://flags/#allow-insecure-localhost
,启用此标志并重新启动chrome.然后,Chrome将忽略本地主机的错误证书
open chrome://flags/#allow-insecure-localhost
, enable this flag and restart chrome. Chrome will then ignore wrong certificates for localhost
这篇关于Angular默认应用服务:Chrome中的隐私错误:NET :: ERR_CERT_AUTHORITY_INVALID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!