【发布时间】:2012-01-30 13:53:53
【问题描述】:
我正在调查跨域问题,我有一些 REST 服务调用。 铬是这样说的: Access-Control-Allow-Headers 不允许请求标头字段 x-requested-with 这是我从 Network -> Headers 选项卡得到的:
Request URL: rest_url_on_other_domain
Request Method:OPTIONS
Status Code:200 OK
Request Headers:
Access-Control-Request-Headers:Origin, x-requested-with, content-type, accept
Access-Control-Request-Method:POST
Origin:http://localhost:8080
Response Headers
Access-Control-Allow-Headers:Content-Type, Accept
Access-Control-Allow-Methods:GET, POST
Access-Control-Allow-Origin:*
Access-Control-Max-Age:1728000
Cache-Control:no-cache, no-store
Connection:keep-alive
Content-Length:0
Date:Fri, 30 Dec 2011 11:29:12 GMT
Expires:-1
Pragma:no-cache
Server:nginx/1.0.2
有人可以解释一下这个 HTTP 标头吗?有什么问题 - 服务器上的某些标头检查失败或客户端(浏览器)上的某些标头检查失败。关于这个 Access 标头的想法是什么?用简单的话详细解释只是为了感觉其余的我会自己学习。提前致谢!
【问题讨论】:
标签: jquery ajax http-headers cross-domain