Pranay Dutta
Pranay Dutta

Reputation: 2591

Disable same origin policy react native webview

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

Answers (1)

Xavier B.
Xavier B.

Reputation: 543

You can't disable the CORS protection, just add your domain to it using originWhitelist prop

Upvotes: 0

Related Questions