Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: use origin-based "same site" definition #965

Merged
merged 4 commits into from Nov 20, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 16 additions & 3 deletions fetch.bs
Expand Up @@ -3107,9 +3107,22 @@ Cross-Origin-Resource-Policy = %s"same-origin" / %s"same-site" ; case-sensit

<li><p>If <var>policy</var> is `<code>same-origin</code>`, then return <b>blocked</b>.

<li><p>If <var>request</var>'s <a for=request>origin</a> is <a>same site</a> with
<var>request</var>'s <a for=request>current URL</a>'s <a for=url>origin</a>, then return
<b>allowed</b>.
<li>
<p>If the following are true

<ul class=brief>
<li><var>request</var>'s <a for=request>origin</a> is <a>schemelessly same site</a> with
<var>request</var>'s <a for=request>current URL</a>'s <a for=url>origin</a>
<li><var>request</var>'s <a for=request>origin</a>'s <a for=url>scheme</a> is
"<code>https</code>" or <var>response</var>'s <a for=response>HTTPS state</a> is
"<code>none</code>"
</ul>

<p>then return <b>allowed</b>.

<p class=note>This prevents HTTPS responses with
`<code>Cross-Origin-Resource-Policy: same-site</code>` from being accessed without secure
transport.

<li><p>If <var>policy</var> is `<code>same-site</code>`, then return <b>blocked</b>.

Expand Down