angularjs - GET request throws error after app implemented SSL: Mixed Content: This request has been blocked; the content must be served over HTTPS" -
mixed content: page @ 'https://www.example.com/dashboard' loaded on https, requested insecure xmlhttprequest endpoint 'http://api.example.com/inventory/10/'. request has been blocked; content must served on https.
we have angular web app runs flask on back-end. working fine until implemented ssl. afterwards, keep getting strange error everywhere.
now, $http.get request in dashboard.js calling "https://api.example.com/inventory/10" in code below , yet error claiming trying request "http" instead.
$http.get($rootscope.baseurl+'/inventory/' + item.id)
where rootscope.baseurl "https://api.example.com".
it's weird because requests going through our web application our back-end, requests throwing weird error.
here's header gets error in our network tab of console in chrome.
request url:https://api.example.com/inventory/10 request headers provisional headers shown accept:application/json, text/plain, / origin:https://www.example.com referer:https://www.example.com/dashboard
it weird case came down removing forward slash end of url fixing everything. somehow, whenever made request using $http in angular baseurl + inventory.id + "/", make http request remove slash, make https request correctly.
still confused
Comments
Post a Comment