野生動物園(10 - OSX埃爾卡皮坦)與CORS
問題我做從AngularJS前端Laravel後端一個CORS POST請求。CORS OPTIONS請求成功,但掛在Safari
- 在Chrome和Firefox,這兩個選項和POST請求返回HTTP狀態200 OK
- 在Safari中10(OSX),這兩個選項和POST請求返回HTTP狀態200 OK,但OPTIONS請求不斷加載( HTTP狀態200 OK!)
請求頭
Accept:*/*
Accept-Encoding:gzip, deflate, sdch
Accept-Language:nl-NL,nl;q=0.8,en-US;q=0.6,en;q=0.4
Access-Control-Request-Headers:content-type
Access-Control-Request-Method:POST
Cache-Control:no-cache
Connection:keep-alive
Host:x.local
Origin:http://y.local
Pragma:no-cache
Referer:http://y.local/
響應頭
Access-Control-Allow-Headers:Origin, X-Requested-With, Content-Type, Accept
Access-Control-Allow-Methods:POST, GET, OPTIONS, PUT
Access-Control-Allow-Origin:*
Cache-Control:no-cache
Connection:keep-alive
Content-Length:16
Content-Type:application/json
Date:Mon, 31 Oct 2016 09:22:51 GMT
Server:nginx/1.11.1
在得到http狀態200 OK(OPTIONS請求)後,Safari掛起。我該怎麼辦?
聽起來類似於http://stackoverflow.com/questions/38789251/xhr-request-hangs-in-safari-on-el-capitan(無答案) –
這也看起來類似https://groups.google。 com/forum /#!topic/angular/3hP4JpTHLYY –
@GünterZöchbauer謝謝,但它對我來說都不適用於HTTP和HTTPS。 – schellingerht