gpt4 book ai didi

javascript - 当信用到期时防止 ISP 重定向重定向到我的应用程序页面

转载 作者:太空宇宙 更新时间:2023-11-04 01:52:35 24 4
gpt4 key购买 nike

我有一个phonegap应用程序,我已经采取了所有措施

<access origin="*://*.mysite/*" subdomains="true" />
<access origin="*://*.gstatic.com/*" subdomains="true" />
<access origin="*://*.google.com/*" subdomains="true" />
<access origin="*://*.googleusercontent.com/*" subdomains="true" />

当我的数据信用到期时,我会被重定向到 ISP 远程页面,这是我不想要的。

如果信用过期,我如何修改我的配置文件或索引页以避免重定向或重定向到内部源。

最佳答案

<meta http-equiv="Content-Security-Policy" content="default-src 'self' http://*.myweb http://myweb/tribes/shopmobile.php  data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline';style-src 'self'https://fonts.googleapis.com/icon?family=Material+Icons;img-src https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css 'self' http://myweb/ data:;script-src * 'unsafe-inline' 'unsafe-eval'; media-src *;style-src 'self' 'unsafe-inline'; img-src 'self' http://myweb data:;child-src 'self' https://www.youtube.com data:;frame-src *;">

我在我的应用程序上使用了上述 csp允许内部链接style-src 'self' 'unsafe-inline' - 允许外部和内部样式script-src * 'unsafe-inline' 'unsafe-eval' - 允许所有js脚本img-src' self 'http://myweb数据:允许来 self 的服务器的图像content="default-src 'self' http://*.myweb http://myweb/tribes/shopmobile.php 数据:间隙:https://ssl.gstatic.com 仅允许来 self 的服务器的数据

上面的代码有效

关于javascript - 当信用到期时防止 ISP 重定向重定向到我的应用程序页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49104515/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com