【发布时间】:2013-11-01 17:18:18
【问题描述】:
我有两个网站:https//:www.domain-only-uses-https.com 和 www.domain-uses-both-http-and-https.com
现在我在前者的页面中向后者发出2个ajax GET请求,一个是
https://www.domain-uses-both-http-and-https.com/some-path (using the HTTPS scheme)
另一个是
http://www.domain-uses-both-http-and-https.com/some-other-path (using the HTTP scheme)
我确实将“https//:www.domain-only-uses-https.com”设置为服务器“www.domain-uses-”中“Access-Control-Allow-Origin:”标头的值http-和-https.com”。
但现在看来 Chrome 只允许请求 1,而请求 2 被禁止。
所以我的问题是:“Access-Control-Allow-Origin”标头是否区分 HTTP 和 HTTPS? 希望我已经说清楚了..
【问题讨论】:
-
我很确定你想写
http://而不是http//:,并且与https..相同
标签: javascript http xmlhttprequest cors