XMLHttpRequest-SEC7127:CORS请求的重定向被阻止 [英] XMLHttpRequest - SEC7127: Redirect was blocked for CORS request

查看:697
本文介绍了XMLHttpRequest-SEC7127:CORS请求的重定向被阻止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我第一次在IE11上访问我们的网页时,我遇到了以下错误.它可以在我的计算机上的Chrome中运行,但不能在其他开发人员的计算机上工作.但是在所有情况下刷新页面时都可以使用.

I am getting below error when I visit our webpage first time on IE11. It works in Chrome on my machine but doesn't work on other developer's machine. But it works when page is refreshed in all cases.

错误是

SEC7118:用于 https://secure.server.com/esi? isie789 = n& __ = 1403623253418 必需的跨源资源共享(CORS).

SEC7118: XMLHttpRequest for https://secure.server.com/esi?isie789=n&_=1403623253418 required Cross Origin Resource Sharing (CORS).

SCRIPT7002:XMLHttpRequest:网络错误0x2ef1,由于错误00002ef1而无法完成操作. SEC7127:重定向因CORS请求而被阻止.

SCRIPT7002: XMLHttpRequest: Network Error 0x2ef1, Could not complete the operation due to error 00002ef1. SEC7127: Redirect was blocked for CORS request.

使用Ajax jquery调用它.

It is being called using Ajax jquery.

    $.ajax({
        url: esiUrl,
        type: 'GET',
        data: "isie789=" + isIE789,
        dataType: 'html',
        cache: false,
        success: function(responseText) {
            if(responseText.length > 0) {
                $("#deal-of-day-esi").replaceWith(responseText);
            }
        },
        error: function() {
        }
    });

正在研究IE11中的请求/响应标头-我没看到任何标头.但是在刷新或Chrome浏览器中,Firefox的确显示了响应标头 低于值

Looking into to request/response headers in IE11 - I don't see any. But on refresh or in Chrome, Firefox we do see response headers with Below values

Access-Control-Allow-Credentials:true Access-Control-Allow-Origin: http://www.server.co.uk

Access-Control-Allow-Credentials:true Access-Control-Allow-Origin:http://www.server.co.uk

请您帮忙.

推荐答案

我在任何地方都找不到此文档,但是在我的测试中,它似乎是:

I can't find this documented anywhere, but in my testing it appears that:

XMLHttpRequest:网络错误0x2ef1

XMLHttpRequest: Network Error 0x2ef1

专门指混合模式错误;例如,当https站点提供重定向到http站点的请求时.

specifically refers to a mixed mode error; for example when an https site serves a request to redirect to an http site.

这篇关于XMLHttpRequest-SEC7127:CORS请求的重定向被阻止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆