简体   繁体   English

HTTP和HTTPS中的AngularJS $ http请求问题

[英]AngularJS $http request issue in HTTP and HTTPS

I have a problem in my angularjs $http request. 我的angularjs $ http请求中有问题。 When I send request to the API it was blocked by the browser like: ERROR IN FIREFOX : Blocked loading mixed active content “ http://www.example.com/rest/default/V1/integration/admin/token/ 当我向API发送请求时,它被浏览器阻止,如:ERROR IN FIREFOX:阻止加载混合的活动内容“ http://www.example.com/rest/default/V1/integration/admin/token/

ERROR IN CHROME: Mixed Content: The page at ' https://www.example.com/load.shtml#/register/pos/docs/2323232221555/new ' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ' http://www.example.com/rest/default/V1/integration/admin/token/ '. CHROME中的错误:混合内容:“ https://www.example.com/load.shtml#/register/pos/docs/2323232221555/new ”上的页面已通过HTTPS加载,但请求了不安全的XMLHttpRequest端点“ http: //www.example.com/rest/default/V1/integration/admin/token/ '。 This request has been blocked; 该请求已被阻止; the content must be served over HTTPS. 内容必须通过HTTPS提供。

How can I fixed this problem? 我该如何解决这个问题? Any idea is accepted. 任何想法都可以接受。

Simple: hit your web API endpoints using SSL. 简单:使用SSL访问您的Web API端点。

https://www.example.com/rest/default/V1/integration/admin/token/ https://www.example.com/rest/default/V1/integration/admin/token/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM