From cae39e6de8d1c60220cb240c4689a902d7b9a8cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=22rysiek=22=20Wo=C5=BAniak?= Date: Fri, 17 Dec 2021 03:35:13 +0000 Subject: [PATCH] Update CONTENT_INTEGRITY.md --- docs/CONTENT_INTEGRITY.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/CONTENT_INTEGRITY.md b/docs/CONTENT_INTEGRITY.md index 34539cf..999a5ff 100644 --- a/docs/CONTENT_INTEGRITY.md +++ b/docs/CONTENT_INTEGRITY.md @@ -20,7 +20,9 @@ However, whether or not integrity is *actually* verified depends on the plugin u For example, integrity (when set for a given request) *will* be verified when using `fetch` and `alt-fetch` plugins, simply because under the hood these plugins use the regular [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API), as implemented by the browser. The Fetch API [`fetch()` method](https://developer.mozilla.org/en-US/docs/Web/API/fetch) accepts an `integrity` init param, and is expected to use it to verify integrity. -A plugin that does not rely on the Fetch API will not benefit from this automatic integrity checking by the browser. In such cases, the `integrity-check` plugin can be used to wrap a such a transport plugin. The `integrity-check` plugin wraps a transport plugin, and when that transport plugin returns a successful `Response`, checks the integrity of the body of that response based on integrity data set on the `Request`. If the integrity check fails, an error is returned. +A plugin that does not rely on the Fetch API will not benefit from this automatic integrity checking by the browser. In such cases, the `integrity-check` plugin can be used to wrap a such a transport plugin. The `integrity-check` plugin wraps a transport plugin, and when that transport plugin returns a successful `Response`, checks the integrity of the body of that response based on [integrity data set in the `Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request/integrity). + +If the integrity check fails, an error is returned. ## General Content Interity