Safari浏览器是否忽略5.1访问控制 - 允许 - 产地*通配符? [英] Does Safari 5.1 ignore Access-Control-Allow-Origin * wildcard?

查看:112
本文介绍了Safari浏览器是否忽略5.1访问控制 - 允许 - 产地*通配符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

试图让一个跨协议,从https同一个域请求HTTP。我已经设置了响应头读访问控制 - 允许 - 产地:* 这确实是工作在Chrome中。然而,它不在Safari工作

Trying to make a cross protocol, same domain request from https to http. I have set the response headers to read Access-Control-Allow-Origin: * which is indeed working in Chrome. However, it doesn't work in Safari.

时的Safari浏览器忽略通配符?难道是给错误的错误,确实有一个不同的问题?

Is Safari ignoring the wildcard? Is it giving the wrong error and indeed there is a different problem?

推荐答案

发现,这确实不是这样的。相反,正在发生的事情是,Safari浏览器正在一个OPTIONS调用AJAX调用之前的服务器,在我的情况我的服务器架构不无额外编码支持。

Found out that this indeed not the case. Instead what is happening is that Safari is making an OPTIONS call to the server before the AJAX call, and in my case my server framework doesn't support it without extra coding.

您可以在这里看到它的文档:

You can see it here in the docs:

<一个href="http://developer.apple.com/library/safari/#documentation/appleapplications/Conceptual/SafariJSProgTopics/Articles/XHR.html" rel="nofollow">http://developer.apple.com/library/safari/#documentation/appleapplications/Conceptual/SafariJSProgTopics/Articles/XHR.html

这篇关于Safari浏览器是否忽略5.1访问控制 - 允许 - 产地*通配符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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