问题描述
我正在开发一个Web应用程序页面,该页面将加载来自example.com/repo
和我的AWS S3的几个图像,以及来自https://code.jquery.com/jquery-etc
的jQuery。
它在localhost上运行,而不在Heroku上运行。我唯一能使用的是Google字体。这是我在帕格(Pug)中的元数据,(我知道,le n'emporte quoi):
meta(http-equiv="Content-Security-Policy" content="default-src 'self' https://www.example.com; script-src 'self' https://code.jquery.com/; style-src 'self' fonts.googleapis.com; img-src 'self' s3://mybucket/ https://s3.amazonaws.com/mybucket/images/ https://www.example.com/repo/; font-src fonts.gstatic.com")
这是控制台输出。我想念什么?预先感谢:
内容安全政策:无法处理未知指令“ script-src-attr” 来源为“ https://code.jquery.com/jquery-3.5.1.slim.min.js”的加载失败。
内容安全政策:该页面的设置阻止了https://code.jquery.com/jquery-3.5.1.slim.min.js(“ script-src”)资源的加载。
内容安全政策:该页面的设置阻止了https://www.example.com/repo/bgr.jpg(“ img-src”)上资源的加载。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)