Angular HTTP 请求被阻止 - 显示混合内容

Angular HTTP request blocked - Showing mixed content

Angular HTTP 请求被阻止 - 显示混合内容。

但是当我通过浏览器URL访问时,内容正在显示。

angular代码是:

            $http.post('http://crms.ttteamthoi.in/get_timespent_br', {
                'from': '01/11/2015',
                'to': '25/11/2015'
            }, {
                "headers": {
                    "Content-Type": "application/json; charset=UTF-8"
                }
            })
            .then(function(response) {
              //code here
            }

显示的控制台错误是:

混合内容:位于“https://dash-thaidash.c9users.io/#/app/tonnage' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://crms.ttteamthoi.in/get_timespent_br”的页面。此请求已被阻止;内容必须通过 HTTPS 提供。

这angular具体吗?

它似乎不 Angular 具体。 crms.ttteamthoi.in 主机告诉你只接受 https 请求,但你 POST 一些数据使用 http 协议。尝试使用 https.

可以模拟http请求here

问题已解决。

服务器是 asp.net 没有 SSL 的应用程序。该呼叫来自 https://c9.io,这是安全的。那是混合内容错误。

将服务器应用程序更改为 SSL,然后为内容类型启用 CORS 就成功了。