I am currently using HTTPS for my website. I have a requirement to send a request for templateUrl
, not to a static file, but to the router:
/:lang/content/library/book/:bookId
Below is the setup for my state
:
.state('book', {
url: '/:lang/library/book/:bookId',
controller: 'BookCtrl',
templateUrl: function(stateParams) {
return stateParams.lang + '/content/library/book/' + stateParams.bookId;
// or: 'https://dev.mysite.com/' + stateParams.lang + '/content/library/book/' + stateParams.bookId;
}
});
However, upon running my app, I encounter this error:
Mixed Content: The page at 'https://dev.mysite.com/en/library/book/4985459864' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://dev.mysite.com/en/content/library/book/4985459864'. This request has been blocked; the content must be served over HTTPS.
Could someone advise me on how to send a secure HTTPS
request for the templateUrl
when using ui-router
?