使用作用域的完整性检查


在范围上将完整性设置为 true 会将清单中未找到的任何资源的完整性设置为 true

在范围上将完整性设置为 null 会将清单中未找到的任何资源的完整性设置为匹配失败。

不包括完整性与将完整性设置为 null 相同。

如果显式地设置了 "integrity",则将忽略用于完整性检查的 "cascade"

以下示例允许加载任何文件:

{
  "scopes": {
    "file:": {
      "integrity": true
    }
  }
}

Setting an integrity to true on a scope will set the integrity for any resource not found in the manifest to true.

Setting an integrity to null on a scope will set the integrity for any resource not found in the manifest to fail matching.

Not including an integrity is the same as setting the integrity to null.

"cascade" for integrity checks will be ignored if "integrity" is explicitly set.

The following example allows loading any file:

{
  "scopes": {
    "file:": {
      "integrity": true
    }
  }
}