test-cors.org icon indicating copy to clipboard operation
test-cors.org copied to clipboard

Documentation

Open trinzia opened this issue 8 years ago • 5 comments

It seemed unclear to me, after enter a URL, whether the answer was yes or no.

Fired XHR event: loadstart Fired XHR event: readystatechange Fired XHR event: progress Fired XHR event: error

XHR status: 0 XHR status text: Fired XHR event: loadend

Should I understand that Cors is enabled on my server or not?

trinzia avatar Jun 24 '16 16:06 trinzia

:+1:

Klortho avatar Jun 26 '16 05:06 Klortho

I'm pretty sure, @trinzia , that yours failed; otherwise, you'd have seen XHR status: 200. But I'm not entirely sure either. I'm having an issue with a server that's failing on a plain text file, but I have no idea why. It would really be nice if this tool could be enhanced with some more troubleshooting affordances.

Klortho avatar Jun 26 '16 05:06 Klortho

Thank you for the feedback. I agree that the error condition could be better highlighted.

The tool tries to surface as much debug information as possible. However, since the request is made client-side, it actually doesn't have access to a lot of debugging information. For example, while Chrome's console will show a detailed error message as to why the CORS request failed, the XHR client can't access that information. However I can include a note that points users to the console for more error details.

monsur avatar Jun 27 '16 03:06 monsur

It took me quite a while googling, but I found that our server needed the module enabled for mod_headers. After requesting that, I was able to make cross-domain ajax requests with $.ajaxSetup headers.

trinzia avatar Jun 27 '16 08:06 trinzia

Likewise using the tool I sort of expected a "red/green" type answer!

epugh avatar Sep 27 '17 14:09 epugh