我正在尝试在互联网上的服务器(http)之间进行ajax调用.并将其定位到我自己的localhost.FF/Chrome/ETC ......有效.它只是一个IE问题.IM使用IE 11和10.
请求甚至没有完成."拒绝访问"立即被抛出.
这是代码.只为你看.
不是IE8和IE9中的经典HTTP/HTTPS错误.这是别的,但文档没有帮助.
$jq.ajax({
contentType: 'application/json',
url: url,
dataType: 'json',
crossDomain: true,
beforeSend: function (xhr) {
xhr.withCredentials = true;
xhr.setRequestHeader("Authorization", "Basic " + $jq.base64.encode(username and password));
},
success: function (data, status, headers) {},
error: function (xhr, status, error) {}
Run Code Online (Sandbox Code Playgroud)
状态是0在xhr对象和错误是"拒绝访问"
ajax xmlhttprequest cors internet-explorer-10 internet-explorer-11
我已经安装了所需的工具,并按照几个教程试图让乘客做出回应.
我可以访问公用文件夹中的静态文件(public/500.html或422.hml).昨天我通过vhost进入,发现一些乘客错误.但是一段时间后托管重新启动了服务,从那以后我再也无法访问rails应用程序了.
这些是我用来配置服务器的一些链接.我也读到这可能是一个许可问题; 我已经检查过了,但我不确定它没问题.