禁用相同的来源策略反应本机WebView
我正在制作React Native应用程序,在内部,我正在使用React-Native-webview来渲染一些我需要访问元素的网页。在该网页中,我们有多个IFRAMES,但是由于Iframes没有相同的域,它给了我错误
通过访问用“ https:// xxxxxxxxxx xx”的框架,用原点“ https://xxxxxxx.xx”阻止了一个框架。协议,域和端口必须匹配。
我如何在反应 - 网络景观中禁用相同的蛋白酶?
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不能禁用CORS保护,只需使用 rigins whitelist prop
You can't disable the CORS protection, just add your domain to it using originWhitelist prop