警告:页面 index.html 运行了不安全的内容 [英] Warning : The page index.html ran insecure content

查看:42
本文介绍了警告:页面 index.html 运行了不安全的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 google appe 引擎上部署了我的应用程序.我的网站使用带有模板 claro 的 Dojo.当我运行谷歌浏览器检查"时,我在浏览我的网站时看到很多警告.这是警告的类型:

I deployed my application on google appe engine. My web site use Dojo with the template claro. When I run "google chrome inspection", I see a lot of warning when I navigate throught my site. Here is the type of warnings :

The page index.html ran insecure content from http://ajax.googleapis.com/ajax/libs/dojo/1.5/dijit/themes/claro/claro.css.
The page index.html ran insecure content from http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js.

我需要在 appengine-web.xml 或 web.xml 中配置一些东西吗?

Do I need to configurate something in the appengine-web.xml or web.xml?

推荐答案

如果您的页面总是通过安全 url (https) 访问,那么您可以尝试访问这些包含文件的安全版本.我认为您可以在这两个文件的 url 中使用 https: 代替 http: .

If your page is always accessed by secure url (https) then you might try accessing the secure versions of those include files. I think you can just use https: in place of http: in the url for those two files.

如果您想变得更有趣,您可以检查页面是否安全,然后选择链接的安全版本或非安全版本.如果您需要,我可以发布一个样本.

If you want to get fancy, you can check to see if the page is secure and pick either the secure or non-secure version of the link. I can post a sample of that if you need it.

附录:为了节省人们的时间,我在这里发布了@mercator 的卓越解决方案:

Addendum: To save people time, I am posting @mercator's superior solution here:

无需花哨.如果您想根据您自己的站点是否安全来选择安全或非安全版本,您可以使用协议相关链接.例如.//ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js

No need to get fancy. If you want to pick the secure or non-secure version depending on whether your own site is secure, you can use a protocol-relative link. E.g. //ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js

这篇关于警告:页面 index.html 运行了不安全的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆