Internet Explorer 11 replaces Authorization header

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

What would cause Internet Explorer to replace the HTTP header

Authorization : Bearer

with

Authorizat

6条回答
  •  感动是毒
    2020-12-05 02:36

    I had the same problem in a knockoutjs application, it worked fine in Chrome and Firefox but not in IE.

    I also used Fiddler and noticed that the first ajax call used Bearer as intended and returned successfully. But then IE started to loop and send the subsequent ajax calls over and over again with the Negotiate authorization instead!

    In my case it was some sort of timing issue in IE, I solved it by making the ajax calls that loaded data during rendering synchronous.

        me.loadLimits = function () {
          $.ajax({
            type: 'GET',
            dataType: 'json',
            contentType: 'application/json',
            url: '/api/workrate/limits',
            headers: me.headers,
            async: false,
            success: function (result) {
        ...
    

提交回复
热议问题