我有一个在 HTTPS 协议(protocol)上运行的应用程序。我编写了一个 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://gainsight.0x10.info/api/image?page_no=0至 https://gainsight.0x10.info/api/image?page_no=0在我的 $http.get
服务中,不幸的是它不可用。
任何帮助..非常感谢
最佳答案
关于javascript - 混合内容问题 $http.get AngularJS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31880201/