【发布时间】:2015-10-31 01:03:53
【问题描述】:
我有一个在 HTTPS 协议上运行的应用程序。我编写了一个 Angular 函数来使用 $http 服务获取数据。
factory.loadImages = function(callback){
$http.get("http://gainsight.0x10.info/api/image?page_no=0")
.success(function(data){
callback(data);
}).error(function(status,error){
console.log(status);
});
};
我收到以下混合内容错误:
Mixed Content: The page at 'https://www.hackerearth.com/gainsight-ui-development-hiring-challenge-1/problems/30146b3bf6954bba9752bd5599b3c8aa/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://gainsight.0x10.info/api/image?page_no=0'. This content should also be served over HTTPS.
现在我尝试在我的$http.get 服务中将http://gainsight.0x10.info/api/image?page_no=0 更改为https://gainsight.0x10.info/api/image?page_no=0,但遗憾的是不可用。
任何帮助.. 非常感谢
【问题讨论】:
标签: javascript ajax angularjs http mixed-content