@@ -2467,7 +2467,7 @@ response <a for=/>header</a> can be used to require checking a <a for=/>request<
2467
2467
<p> Its <a for=header>value</a> <a>ABNF</a> :
2468
2468
2469
2469
<pre>
2470
- Cross-Origin-Resource-Policy = %x73.61.6D.65 / %x73.61.6D.65.2D.73.69.74.65 ; "same" / "same-site"; case-sensitive</pre>
2470
+ Cross-Origin-Resource-Policy = %x73.61.6D.65 / %x73.61.6D.65.2D.73.69.74.65 ; "same" / "same-site", case-sensitive</pre>
2471
2471
2472
2472
<p> To perform a <dfn>cross-origin resource policy check</dfn> , given a <var> request</var> and
2473
2473
<var> response</var> , run these steps:</p>
@@ -2481,33 +2481,27 @@ Cross-Origin-Resource-Policy = %x73.61.6D.65 / %x73.61.6D.65.2D.73.69.74.65
2481
2481
<var> request</var> 's <a for=request>current url</a>' s <a for=url>origin</a> , then return
2482
2482
<b> allowed</b> .
2483
2483
2484
- <p class=note> A cross-origin response redirecting to a same or same-site resource with the
2485
- `<a http-header><code>Cross-Origin-Resource-Policy</code></a> ` header specified does not affect
2486
- anything.
2487
- <!-- We could make this have an effect if we fix https://github.com/whatwg/fetch/pull/594 first,
2488
- but even then we normally do not let this have any effect for "no-cors" so it would be
2489
- somewhat inconsistent if it did here, but might still be better... -->
2490
-
2491
- <li><p> Let <var> policy</var> be the <a>combined value</a> with
2492
- `<a http-header><code>Cross-Origin-Resource-Policy</code></a> ` and <var> response</var> 's
2493
- <a for=response>header list</a> .
2494
-
2495
- <li><p> If <var> policy</var> is `<code> same</code> `, then return <b> blocked</b> .
2484
+ <p class="note no-backref"> A cross-origin response redirecting to a response that is
2485
+ <a>same origin</a> or <a>same site</a> with the initial request and has a
2486
+ `<a http-header><code>Cross-Origin-Resource-Policy</code></a> ` header specified, does not affect
2487
+ anything. I.e., <var> request</var> 's <a for=request>tainted origin flag</a> is not checked.
2496
2488
2497
2489
<li>
2498
- <p> If <var> policy</var> is `<code> same-site</code> ` and neither of the following is true
2490
+ <p> Let <var> policy</var> be the <a>combined value</a> with
2491
+ `<a http-header><code>Cross-Origin-Resource-Policy</code></a> ` and <var> response</var> 's
2492
+ <a for=response>header list</a> .
2499
2493
2500
- <ul class=brief>
2501
- <li><p><var> request</var> 's <a for=request>origin</a>' s <a for=origin>host</a>
2502
- <a>is a registrable domain suffix of or is equal to</a> <var> request</var> 's
2503
- <a for=request>current url</a> 's <a for=url>host</a>
2494
+ <p class=note> This means that `<code> Cross-Origin-Resource-Policy: same-site, same</code> ` ends up
2495
+ as <b> allowed</b> below as it will never match anything. Two or more
2496
+ `<a http-header><code>Cross-Origin-Resource-Policy</code></a> ` headers will have the same effect.
2504
2497
2505
- <li><p><var> request</var> 's <a for=request>current url</a>' s <a for=url>host</a>
2506
- <a>is a registrable domain suffix of or is equal to</a> <var> request</var> 's
2507
- <a for=request>origin</a> 's <a for=origin>host</a>
2508
- </ul>
2498
+ <li><p> If <var> policy</var> is `<code> same</code> `, then return <b> blocked</b> .
2509
2499
2510
- <p> then return <b> blocked</b>
2500
+ <li><p> If <var> request</var> 's <a for=request>origin</a>' s <a for=url>host</a> is <a>same site</a>
2501
+ with <var> request</var> 's <a for=request>current url</a>' s <a for=url>host</a> , then return
2502
+ <b> allowed</b> .
2503
+
2504
+ <li><p> If <var> policy</var> is `<code> same-site</code> `, then return <b> blocked</b> .
2511
2505
2512
2506
<li><p> Return <b> allowed</b> .
2513
2507
</ol>
@@ -3809,8 +3803,9 @@ Range Requests</cite>. [[HTTP-RANGE]] However, this is not widely supported by b
3809
3803
</ol>
3810
3804
</ol>
3811
3805
3812
- <li><p> If the <a>cross-origin resource policy check</a> with <var> request</var> and
3813
- <var> response</var> returns <b> blocked</b> , then return a <a>network error</a> .
3806
+ <li><p> If the <i> CORS flag</i> is unset and the <a>cross-origin resource policy check</a> with
3807
+ <var> request</var> and <var> response</var> returns <b> blocked</b> , then return a
3808
+ <a>network error</a> .
3814
3809
3815
3810
<li>
3816
3811
<p> If <var> response</var> 's <a for=response>status</a> is <code> 401</code> , <i> CORS flag</i>
0 commit comments