Skip to content

Commit

Permalink
Add the request initiator origin and fix its use
Browse files Browse the repository at this point in the history
  • Loading branch information
bvandersloot-mozilla committed Feb 3, 2025
1 parent 5971b14 commit fb9259d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ urlPrefix:https://www.ietf.org/archive/id/draft-annevk-johannhof-httpbis-cookies
urlPrefix:https://html.spec.whatwg.org#;type:dfn;spec:html
url:TODO;text:ancestry;for:environment
url:TODO;text:has storage access;for:environment
url:TODO;text:initiator origin;for:request
</pre>

<pre class=biblio>
Expand Down Expand Up @@ -1957,6 +1956,10 @@ not always relevant and might require different behavior.
"<code>client</code>" or an <a for=/>origin</a>. Unless stated otherwise it is
"<code>client</code>".

<p>A <a for=/>request</a> has an associated
<dfn export for=request id=concept-request-navigation-initiator-origin>navigation initiator origin</dfn>, which is
an <a for=/>origin</a> or null. Unless stated otherwise it is null.

<p class=note>"<code>client</code>" is changed to an <a for=/>origin</a> during
<a lt=fetch for=/>fetching</a>. It provides a convenient way for standards to not have to set
<a for=/>request</a>'s <a for=request>origin</a>.
Expand Down Expand Up @@ -3385,11 +3388,11 @@ given a <a for=/>request</a> <var>request</var> and a <a for=/>response</a> <var
<p>To <dfn>determine the same-site mode</dfn> for a given <a for=/>request</a> <var>request</var>, run these steps:
<ol>
<li><p><a for=/>Assert</a>: <var>request</var>'s <a for=request>method</a> is "GET" or "POST".
<li><p>If <var>request</var>'s <a for=request>navigation initiator origin</a> is not null and is not <a for=/>same site</a> to <var>request</var>'s <a for=request>URL</a>'s <a for=url>origin</a>, return "<code>UnsetOrLess</code>".
<li><p>If <var>request</var>'s <a for=request>method</a> is "GET" and
<var>request</var>'s <a for=request>destination</a> is "document", return "<code>LaxOrLess</code>".
<li><p>If <var>request</var>'s <a for=request>client</a>'s <a for=environment>ancestry</a> is "<code>cross-site</code>", return "<code>UnsetOrLess</code>".
<li><p>If <var>request</var>'s <a for=request>redirect-taint</a> is "<code>Cross-Site</code>", return "<code>UnsetOrLess</code>".
<li><p>If <var>request</var>'s <a for=request>initiator origin</a> is not <a for=/>same site</a> to <var>request</var>'s <a for=request>URL</a>'s <a for=url>origin</a>, return "<code>UnsetOrLess</code>".
<li><p>Return "StrictOrLess".
</ol>
</div>
Expand Down

0 comments on commit fb9259d

Please sign in to comment.