test-cors.org
test-cors.org copied to clipboard
Documentation
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?
:+1:
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.
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.
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.
Likewise using the tool I sort of expected a "red/green" type answer!