2
這是一個有關多域訪問chrome中相同服務器文件的問題。CORS訪問控制 - 允許源緩存問題
=========
服務器:Apache(支持CORS)
文件URL:www.a.com/a.file
多域: b.com,c.com ...
=========
情況:(鉻)
b.com access a.file:success。
然後c.com訪問a.file:失敗
b.com訪問a.file:成功。
然後鉻清潔緩存,
和c.com訪問a.file:成功
b.com與HTTP訪問a.file: 成功。
,然後用HTTPSb.com訪問a.file:失敗(如1)
b.com訪問a.file與HTTP:成功。
然後乾淨高速緩存鉻的,
和b.com訪問a.file與HTTPS:失敗(如2)
在情況1中,這裏是請求頭。並且我注意到請求將從緩存中訪問文件,並且訪問控制允許來源都是http://www.b.com。也許這是這個問題的關鍵。但我不知道......
b.com
Request URL:www.a.com/a.file
Request Method:GET
Status Code:200 OK (from cache) <-here
Response Headers
Accept-Ranges:bytes
Access-Control-Allow-Methods:GET, POST
Access-Control-Allow-Origin:http://www.b.com <--(here! the same as situation 2)
Content-Length:115
Content-Type:text/plain
Date:Wed, 04 Nov 2015 10:21:29 GMT
Last-Modified:Tue, 28 Jul 2015 01:41:20 GMT
Server:Apache
℃。com
Request URL:www.a.com/a.file
Request Method:GET
Status Code:200 OK (from cache) <-here
Response Headers
Accept-Ranges:bytes
Access-Control-Allow-Methods:GET, POST
Access-Control-Allow-Origin:http://www.b.com <--(here! it is "http://www.a.com" in situation 2)
Content-Length:115
Content-Type:text/plain
Date:Wed, 04 Nov 2015 10:21:29 GMT
Last-Modified:Tue, 28 Jul 2015 01:41:40 GMT
Server:Apache
您是否將此添加到'a.com''b.com'或'c.com'的conf中?文件所屬的a.com上的 –
。 –
謝謝!需要檢查一下我正在做的事情:) –