Skip to content
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

Closed
dcramer opened this issue Feb 3, 2012 · 5 comments
Closed

Swap out AJAX with basic XDR #1

dcramer opened this issue Feb 3, 2012 · 5 comments

Comments

@dcramer
Copy link
Member

dcramer commented Feb 3, 2012

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.

@bkonkle
Copy link
Contributor

bkonkle commented Feb 3, 2012

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.

@bkonkle
Copy link
Contributor

bkonkle commented Feb 6, 2012

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

@bkonkle
Copy link
Contributor

bkonkle commented Feb 9, 2012

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.

@dcramer
Copy link
Member Author

dcramer commented Apr 10, 2012

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?

@dcramer
Copy link
Member Author

dcramer commented May 8, 2012

This is no longer a concern

@dcramer dcramer closed this as completed May 8, 2012
kamilogorek pushed a commit that referenced this issue Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants