javascript - 是否可以使用 javascript 记录客户端子资源完整性错误?
问题描述
我正在寻找一种方法来拦截在任何完整性哈希值无效时生成的子资源完整性错误消息。有没有办法使用页面上的 JavaScript 拦截这些事件,或者检测节点是否具有无效integrity
属性?
例如这些错误消息:
None of the “sha384” hashes in the integrity attribute match the content of the sub-resource.
Failed to find a valid digest in the 'integrity' attribute for resource 'http://path/to/file' with computed SHA-256 integrity '[hash]'. The resource has been blocked.
解决方案
推荐阅读
- tensorflow-lite - TFLiteConverter 无需量化即可更改模型结果
- pine-script - 在交易视图中在历史最高点画一条线
- python - 如何在 node.js 进程和 python 进程之间进行通信
- r - 批处理运行 Rscript (R CMD BATCH) 无法将 UNC 路径识别为当前路径
- python - 为什么 matplotlib 图和 seaborn 图中的计数值不同,而且都是错误的?
- oracle - 如何修复:ORA-01536:将数据从一列复制到同一表中的另一列时,表空间“数据”错误超出空间配额
- c++ - 如何在 Qt Widgets 中比 QPainter.drawText 更快地绘制文本?
- html - 将不同的动画应用于单个类中的多个背景图像
- python - UnicodeDecodeError:“utf-8”编解码器无法解码位置 2 中的字节 0xf3:无效的继续字节
- python - 石头剪刀布游戏 Python Count Feature Not Counting full session using functions