gpt4 book ai didi

javascript - 警告 : The page index. html 运行了不安全的内容

转载 作者:IT王子 更新时间:2023-10-29 03:18:52 25 4
gpt4 key购买 nike

我在 Google Appe Engine 上部署了我的应用程序。我的网站使用带有模板 claro 的 Dojo。当我运行“google chrome inspection”时,我在浏览我的网站时看到很多警告。这是警告的类型:

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 中配置一些东西?

最佳答案

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

如果您喜欢,可以检查页面是否安全并选择链接的安全或非安全版本。如果您需要,我可以发布一个示例。

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

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

关于javascript - 警告 : The page index. html 运行了不安全的内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7309013/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com