只在托管应用程序时出错但在本地主机中不存在

问题描述:

我一直在AngularJS 2中工作,并且在本地服务器上托管时我没有错误,一切都是okey.But托管到Firebase服务器时,一些错误出现在控制台中。这里是链接...:只在托管应用程序时出错但在本地主机中不存在

出现在谷歌Chrome和Firefox这混合内容错误

https://test-calculadora.firebaseapp.com

错误

混合内容:在“https://test-calculadora.firebaseapp.com/页面'通过HTTPS加载,但请求了一个不安全的样式表'http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,400,300,600'。此请求已被阻止;内容必须通过HTTPS提供。

该错误只出现在谷歌浏览器

ERROR TypeError: Cannot read property '0' of null 
at Object.updateDirectives (3.ad64bef68a696aaec9de.chunk.js:1) 
at Object.updateDirectives (vendor.be20388edeb374983d23.bundle.js:127) 
at or (vendor.be20388edeb374983d23.bundle.js:127) 
at mr (vendor.be20388edeb374983d23.bundle.js:127) 
at gr (vendor.be20388edeb374983d23.bundle.js:127) 
at or (vendor.be20388edeb374983d23.bundle.js:127) 
at mr (vendor.be20388edeb374983d23.bundle.js:127) 
at gr (vendor.be20388edeb374983d23.bundle.js:127) 
at or (vendor.be20388edeb374983d23.bundle.js:127) 
at mr (vendor.be20388edeb374983d23.bundle.js:127) 

通知被示数链接如何开始以 'http' 而不是 'https' 时。 http本质上是“不安全的”。

'http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,400,300,600' 

你应该可以添加's'到http,并且应该修复这些问题。

什么谷歌一直在说:你的网页上加载资源时//网址:

始终使用https。使用 Content-Security-Policy-Report-Only标头来监控您网站上的混合内容 错误。使用升级不安全请求CSP指令 来保护您的访问者免受不安全内容的侵害。

了解更多here