File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,6 @@ function reactNativePlugin(Raven) {
2727 }
2828
2929 function xhrTransport ( options ) {
30- options . auth . sentry_data = JSON . stringify ( options . data ) ;
31-
3230 var request = new XMLHttpRequest ( ) ;
3331 request . onreadystatechange = function ( e ) {
3432 if ( request . readyState !== 4 ) {
@@ -46,8 +44,12 @@ function reactNativePlugin(Raven) {
4644 }
4745 } ;
4846
49- request . open ( 'GET' , options . url + '?' + urlencode ( options . auth ) ) ;
50- request . send ( ) ;
47+ request . open ( 'POST' , options . url + '?' + urlencode ( options . auth ) ) ;
48+ // Sentry expects an Origin header when using HTTP POST w/ public DSN.
49+ // Just set a phony Origin value; only matters if Sentry Project is configured
50+ // to whitelist specific origins.
51+ request . setRequestHeader ( 'Origin' , 'react-native://' ) ;
52+ request . send ( JSON . stringify ( options . data ) ) ;
5153 }
5254
5355 // react-native doesn't have a document, so can't use default Image
You can’t perform that action at this time.
0 commit comments