I have the following script tag in our void SwapRightMostNBits(int& a, int& b, unsigned int n){
if (n>31) { n=31; }
int mask=static_cast<int>(pow(2,n)-1);
a ^= (b & mask);
b ^= (a & mask);
a ^= (b & mask);
}
file.
<div id=cards>
<div ng-repeat='card in cards' class='card'>
<card-directive
_id={{card._id}} attack={{card.attack}} cost={{card.cost}}
health={{card.health}} img={{card.img}} name={{card.name}}
hero={{hero}} rarity={{card.rarity}} type={{card.type}}
class={{hero}} add={{add}} faction={{card.faction}} >
</card-directive>
</div>
</div>
This works fine but after a few days on the just the production server. It will fails to load. The error is saying it is an http request over an https connection and drops it.
We have a URL rule in IIS to even redirects all requests to be https.
If you know what is happening great but I mainly want to know one thing. If the request is https why will the browser request http and not https when using this tag.
Update
I have thought about making the path absolute but this will broke the relationship with local, development and user testing environments.
We have other tags that are setup the same way that work fine.
function cardDirective() {
return {
restrict: 'E',
scope: {
'_id': '@',
'img': '@',
'attack': '@',
'cost': '@',
'health': '@',
'name': '@',
'rarity': '@',
'type': '@',
'hero': '@',
'add': '@',
'faction': '@'
},
--thoughts on the matter--
As I have a script tag that does not have this issue It makes me think it is something to do with IIS. I don't know how IIS could be involved here besides URL rewrites which I already check all request are being redirected to https, which leads me to a dead end.
答案 0 :(得分:0)
Not sure why it is happening, but as a solution you could try to right out an absolute path to the script with https written out: https://yoursite.com/lib/js/vendor.min.js