-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swap out AJAX with basic XDR #1
Comments
I was under the impression that jQuery/Zepto handled cross-domain requests with jsonp, which was one of the major reasons I went ahead and made the code dependent on them. I'll do some more testing next week. |
Upon further research, I've learned that jQuery handles cross-domain requests with the "Origin" header. If the server responds with an "Access-Control-Allow-Origin" header that matches "Origin", then the cross-domain request is allowed by the browser. I've submitted a pull request to enable this here: dcramer/sentry#340 |
After enabling preflighted cross-domain requests (dcramer/sentry#346), this now works reliably in Chrome, Firefox, and Safari. I haven't tested it in IE yet, but I plan to. My opinion is that this is the modern way to do cross-domain requests, and we should make iframe + form requests a secondary option. |
Are we ok with just using the origin headers and the public key at this point, or do we need to do some additional work in Sentry core? |
This is no longer a concern |
We should change the AJAX call to create an iframe + form and POST to the endpoint, this will allow it to work on non-same-domain installs.
The text was updated successfully, but these errors were encountered: