I am having a strange problem. I have a good (as I thought) CORS installation on my server, but it only works once after refreshing the page. All other requests are skipped or deleted. XHR has a status of 0 , and there is no response text (I know it's silly to expect any text for HTTP 204) or statusText, but readyState is 4 .
Request OPTIONS headers:
OPTIONS http://domain2.xx HTTP/1.1 Host: domain2.xx Proxy-Connection: keep-alive Access-Control-Request-Headers: origin, content-type Access-Control-Request-Method: POST Origin: http://domain1.xx Accept: */*,image/webp Referer: http://domain1.xx/index.html User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 9_2 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/47.0.2526.107 Mobile/13C75 Safari/601.1.46 Accept-Encoding: gzip, deflate, sdch Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4</i>
OPTIONS response headers:
HTTP/1.1 204 No Content Server: nginx Date: Sat, 19 Dec 2015 14:56:10 GMT Content-Type: text/plain Access-Control-Allow-Credentials: true Access-Control-Allow-Headers: Origin,Cache-Control,Content-Type,Cookie,X-Requested-With,Accept,Authorization,Accept-Language,Content-Language,Last-Event-ID,X-HTTP-Method-Override Access-Control-Allow-Methods: GET,POST,OPTIONS Access-Control-Allow-Origin: http://domain1.xx Access-Control-Expose-Headers: Access-Control-Allow-Origin Access-Control-Max-Age: 0 Cache-Control: max-age=0 Set-Cookie: ******; Expires=Thu, 31 Dec 2037 23:55:55 GMT; Max-Age=315576000; Path=/; HttpOnly Connection: keep-alive
This only happens on Chrome on iOs. All other browsers behave well. (By all I mean IE8 +, Chrome (Win7 +, MacOs, Linux, Android), FF (Win7 +, MacOsX, Linux, Android), Safari (MacOsX, iOs), Opera (Win7 +, Linux, Android, iOs) UC Browser (android, iOs), and maybe I could forget where this works fine).
thanks