angularjs – ios上的角度/离子iframe问题
发布时间:2020-12-17 17:56:37 所属栏目:安全 来源:网络整理
导读:我在iPhone上的离子应用程序有问题. Ionic将此写入index.html: iframe src="gap://ready" style="display:none;".../iframe 应用程序的控制台输出每秒循环此错误大约40次: Refused to load gap://ready because it appears in neither the child-src direc
我在iPhone上的离子应用程序有问题. Ionic将此写入index.html:
<iframe src="gap://ready" style="display:none;">...</iframe> 应用程序的控制台输出每秒循环此错误大约40次: Refused to load gap://ready because it appears in neither the child-src directive nor the default-src directive of the Content Security Policy. 我猜每次使用angular的dirtycheck工作时,都会抛出此错误. iframe来自何处以及如何摆脱iframe和错误? 解决方法
解决方案,只需将index:添加到index.html中的以下元标记:
<meta http-equiv="Content-Security-Policy" content="default-src * data: cdvfile: gap:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'"/> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |