violates Content Security Policy报错1
报错 Security content policy
2023-09-14 09:04:13 时间
index.html:1 Refused to load the script ‘https://webapi.amap.com/maps?v=1.4.13&key=b7063c0343460ca9d087685f2be0835b’ because it violates the following Content Security Policy directive: “default-src ‘self’ data: gap: https://ssl.gstatic.com ‘unsafe-eval’”. Note that ‘script-src-elem’ was not explicitly set, so ‘default-src’ is used as a fallback.
在html的head中加入如下代码:
<meta http-equiv="Content-Security-Policy" content="default-src *; child-src * 'self' blob: http:;
img-src * 'self' data: http:; script-src 'self' 'unsafe-inline' 'unsafe-eval' *;
style-src 'self' 'unsafe-inline' *">
相关文章
- yii2 HeadersAlreadySentException 报错 解决方案
- 问题-RZ安装后报错“RzBorder.pas”
- loadrunner12.55安装报错:无法安装vc2010sp1_mfc_security_update_x86vcredist_x86.exe passive/norestart 退出代码5
- 解决PHP中使用header输出头报错问题
- python print 打印的数据包含中文,打印报错UnicodeDecodeError: 'gbk' codec can't decode bytes in position 459-460: illegal multibyte sequence解决办法
- Keepalived配置报错Unicast peers are not supported in strict mode
- 【异常】解决报错[org/springframework/security/web/AuthenticationEntryPoint.class] cannot be opened because
- 【异常】Nginx报错[emerg]: unknown directive “user“ in /usr/local/nginx/conf/nginx.conf:xx报错处理
- android 报错 net::ERR_CLEARTEXT_NOT_PERMITTED
- vue3报错 Vue received a Component which was made a reactive object.
- 行人重识别0-04:DG-Net(ReID)-模型训练-报错解决
- git踩坑注意事项(git老是无法提交和push别人的代码到自己的仓库报错)git去掉别人的原仓库地址的方法