(also posted in https://github.com/facebook/react-native/issues/20989)
I am trying to render WebView in a React Native application, and I get "Invalid CORS request" error.
I have read several discussions of this (e.g. Android Webview: disable CORS), but none is involving React Native. Is there any way to overcome this problem in React Native?
Here is the render code:
return (
<View style={styles.container}>
<WebView style={styles.webview}
source={{
uri: uri,
method: 'POST',
body: `apiKey=${apiKey}&broker=${broker}` }}
javaScriptEnabled={true}
domStorageEnabled={true}
startInLoadingState={false}
scalesPageToFit={true} />
</View>
);