diff --git a/fetch.bs b/fetch.bs index d95c30c78..a317c5166 100644 --- a/fetch.bs +++ b/fetch.bs @@ -3232,9 +3232,9 @@ Cross-Origin-Resource-Policy = %s"same-origin" / %s"same-site" / %s"cross-or
To perform a cross-origin resource policy check, given an origin -origin, an environment settings object settingsObject, a -response response, and an optional boolean forNavigation, run -these steps: +origin, an environment settings object settingsObject, a string +destination, a response response, and an optional boolean +forNavigation, run these steps:
Set forNavigation to false if it is not given. @@ -3254,14 +3254,14 @@ these steps: embedderPolicy's report only value, response, and forNavigation returns blocked, then queue a cross-origin embedder policy CORP violation report with response, - settingsObject, and true. + settingsObject, destination, and true.
If the cross-origin resource policy internal check with origin, embedderPolicy's value, response, and forNavigation returns allowed, then return allowed.
Queue a cross-origin embedder policy CORP violation report with response, - settingsObject, and false. + settingsObject, destination, and false.
Return blocked.
To queue a cross-origin embedder policy CORP violation report, given a response response, an environment settings object -settingsObject, and a boolean reportOnly, run these steps: +settingsObject, a string destination, and a boolean reportOnly, +run these steps:
Let endpoint be settingsObject's @@ -3350,10 +3351,13 @@ these steps: settingsObject's embedder policy's reporting endpoint otherwise. -
Let serialized url be the result of +
Let serializedURL be the result of serializing a response URL for reporting with response. +
Let disposition be "reporting
" if reportOnly is true;
+ otherwise "enforce
".
+
Let body be a new object containing the following properties: @@ -3368,8 +3372,16 @@ these steps:
corp
"
blocked-url
"
- blockedURL
"
+ destination
"
+ disposition
"
+ If either request's response tainting or response's
type is "opaque
", and the
cross-origin resource policy check with request's origin,
- request's client, and actualResponse returns
- blocked, then return a network error.
+ request's client, request's
+ destination, and actualResponse returns blocked, then return
+ a network error.
The cross-origin resource policy check runs for responses coming from the network and responses coming from the service worker. This is different from the