Internet Explorer 11 replaces Authorization header

前端 未结 6 2040
北荒
北荒 2020-12-05 02:09

What would cause Internet Explorer to replace the HTTP header

Authorization : Bearer

with

Authorizat

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-05 02:51

    I also encountered this issue when I was kicking off multiple data loads in my angular app.

    I worked around this by detecting the browser and if IE, delayed each request by 50ms based on the index of the call:

    return $q(function(resolve, reject) {
     var delay = self.widget.useDelayLoading ? self.widget.index * 50 : 0;
    
     setTimeout(function() {
       restService.genericApi(self.widget.url, false).queryPost(json).$promise
        .then(
         function(r) { resolve(r); }, 
         function(e) { reject(e); }
        );
     }, delay);
    });
    

    Interestingly, when I used $timeout, I had to increase the delay to 100ms.

提交回复
热议问题