[英]Mixed Content Issue $http.get AngularJS
我有一個運行在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不幸的是不可用。
任何幫助..萬分感謝
即使您能夠調用http終結點,您也將無法加載資源,因為它位於其他域上並且存在跨域問題(除非您使用jsonp或cors進行了修復)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.