我正在配置一个 magento 2.1.7 部署,使用 IIS 和 php。
我正在从 TemplateMonster ( Theme )运行一个主题
我已将商店配置为通过 SSL 运行,但我收到混合内容警告,因为有一些 JS 脚本试图通过 http 加载谷歌地图 api 引用。这发生在商店的所有页面上。这些页面是动态创建的,因此我无法追踪代码是从哪里注入的。
对于我的生活,我无法找到在模板或 magento 源中实现它的位置。我已经浏览了所有的内容块和页面,我就是找不到。我的 magento 主题技能是 0,所以我不知道主题开发人员会在哪里添加混合到每个渲染页面的代码。
我的警告:
Mixed Content: The page at '***.html' was loaded over HTTPS, but requested an insecure script 'http://maps.googleapis.com/maps/api/js?sensor=true&callback=initialize'. This content should also be served over HTTPS.
来源被报告为页面不存在(动态生成)
这是导致我的问题的代码块,我只是找不到它!
function loadScript() {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://maps.googleapis.com/maps/api/js?sensor=true&callback=initialize";
document.body.appendChild(script);
}
有任何想法吗?