在 chrome beta 版本中,我的一个应用程序出现以下错误,
Failed to find a valid digest in the 'integrity' attribute for resource 'http://localhost:8000/assets/vendor-2d2d91b98d3771c414a0b039e0b4d8c1.js' with computed SHA-256 integrity 'RtMfPvtdjkEbERLgZ70Z5f8rCHbsou/DcqEZCXiM8ME='. The resource has been blocked.
作为github thread指出它已修复,但我在 ember-cli-2.14.1
和 "ember-cli-sri": "^2.1.0",
中收到此错误,所以我将包括 integrity=''
。我想知道,此更改会产生任何后果吗?
最佳答案
您绘制的脚本或 css(可能在 CDN 中)已更改。但您的 html 使用完整性来确保文件未更改。例如:
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f" crossorigin="anonymous"></script>
关于javascript - 在 ember app chrome beta 版本中 - 无法在资源的 'integrity' 属性中找到有效的摘要,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48416360/