Skip to content

Commit 6847cac

Browse files
committed
Allow HTTP scheme fetches to make CORS preflight
This allows navigations to make CORS preflight requests, if the navigation contains a request that is not safelisted. Navigation does not (yet) provide APIs for non-safelisted requests; this update to the fetch spec is a prerequisite for HTML spec changes that might add those APIs (i.e. PUT method support in forms).
1 parent bdb452e commit 6847cac

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

fetch.bs

+9-3
Original file line numberDiff line numberDiff line change
@@ -5106,7 +5106,13 @@ steps:
51065106
<p>When in doubt, return a <a>network error</a>.
51075107

51085108
<dt><a>HTTP(S) scheme</a>
5109-
<dd><p>Return the result of running <a>HTTP fetch</a> given <var>fetchParams</var>.
5109+
<dd>
5110+
<ol>
5111+
<li><p>Let <var>forNavigation</var> be true if <a for=request>mode</a> is
5112+
<code>navigate</code>; false otherwise.
5113+
<li><p>Return the result of running <a>HTTP fetch</a> given <var>fetchParams</var> and true if
5114+
request's mode is navigate, and false otherwise.
5115+
</ol>
51105116
</dl>
51115117

51125118
<li><p>Return a <a for=/>network error</a>.
@@ -5118,7 +5124,7 @@ steps:
51185124

51195125
<div algorithm>
51205126
<p>To <dfn export id=concept-http-fetch>HTTP fetch</dfn>, given a <a for=/>fetch params</a>
5121-
<var>fetchParams</var> and an optional boolean <var>makeCORSPreflight</var> (default false), run
5127+
<var>fetchParams</var> and an optional boolean <var>allowCORS</var> (default false), run
51225128
these steps:
51235129
<!-- This is exported for service workers, but that specification only mentions it in passing. -->
51245130

@@ -5218,7 +5224,7 @@ these steps:
52185224

52195225
<ol>
52205226
<li>
5221-
<p>If <var>makeCORSPreflight</var> is true and one of these conditions is true:
5227+
<p>If <var>allowCORS</var> is true and one of these conditions is true:
52225228

52235229
<ul class=brief>
52245230
<li><p>There is no <a>method cache entry match</a> for <var>request</var>'s

0 commit comments

Comments
 (0)