We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 830eb04 + bdc68d8 commit b1b7c59Copy full SHA for b1b7c59
plugins/react-native.js
@@ -45,6 +45,12 @@ function reactNativePlugin(Raven) {
45
};
46
47
request.open('POST', options.url + '?' + urlencode(options.auth));
48
+
49
+ // NOTE: React Native ignores CORS and will NOT send a preflight
50
+ // request for application/json.
51
+ // See: https://facebook.github.io/react-native/docs/network.html#xmlhttprequest
52
+ request.setRequestHeader('Content-type', 'application/json');
53
54
// Sentry expects an Origin header when using HTTP POST w/ public DSN.
55
// Just set a phony Origin value; only matters if Sentry Project is configured
56
// to whitelist specific origins.
0 commit comments