Git Product home page Git Product logo

Comments (5)

bkonkle avatar bkonkle commented on August 16, 2024

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.

from sentry-javascript.

bkonkle avatar bkonkle commented on August 16, 2024

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

from sentry-javascript.

bkonkle avatar bkonkle commented on August 16, 2024

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.

from sentry-javascript.

dcramer avatar dcramer commented on August 16, 2024

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?

from sentry-javascript.

dcramer avatar dcramer commented on August 16, 2024

This is no longer a concern

from sentry-javascript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.