Reputation: 2591
I am making a react native application and inside i am using react-native-webview to render some webpages where i need to gain access to elements. Inside that webpage we have multiple iframes but since iframes don't have the same domain it gives me error as
Blocked a frame with origin "https://XXXXXXXX.XX" from accessing a frame with origin "https://XXXXXXX.XX". Protocols, domains, and ports must match.
how can i disable same-origin-policy in react-native-webview?
Thanks
Upvotes: 1
Views: 1941
Reputation: 543
You can't disable the CORS protection, just add your domain to it using originWhitelist prop
Upvotes: 0