-
Notifications
You must be signed in to change notification settings - Fork 356
Accept 'sec-'-prefixed headers as CORS-safelisted. #1000
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -708,7 +708,11 @@ production as | |
<li><p>Let <var>value</var> be <var>header</var>'s <a for=header>value</a>. | ||
|
||
<li> | ||
<p><a>Byte-lowercase</a> <var>header</var>'s <a for=header>name</a> and switch on the result: | ||
<p>Let <var>name</var> be the result of <a>byte-lowercasing</a> <var>header</var>'s | ||
<a for=header>name</a>. | ||
|
||
<li> | ||
<p>Switch on <var>name</var>: | ||
|
||
<dl class=switch> | ||
<dt>`<code>accept</code>` | ||
|
@@ -760,7 +764,12 @@ fetch("https://victim.example/naïve-endpoint", { | |
</div> | ||
|
||
<dt>Otherwise | ||
<dd><p>Return false. | ||
<dd> | ||
<p>If <var>name</var> does not begin with the string "<code>sec-</code>", return false. | ||
|
||
<p class=note>As all headers beginning with "<code>Sec-</code>" are <a>forbidden header | ||
mikewest marked this conversation as resolved.
Show resolved
Hide resolved
|
||
names</a>, we have some confidence that they're generated by the user agent, and not via APIs | ||
that developers directly control. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The other thing we should point out here is #880 (comment). In particular, if Fetch isn't in control of setting these headers, you might be in for a surprise with service workers. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't quite follow where that conversation ended up. What's the behavior in Service Workers that we want? What behavior would surprise developers? @yoavweiss There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, the surprising bits would be that For the CH case, I think we could solve this by re-adding them below SWs (but @annevk had reservations). For Fetch-Metadata, maybe you could simply add them below SWs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think for Fetch-Metadata all is in order because they are set as part of main fetch. |
||
</dl> | ||
|
||
<li><p>If <var>value</var>'s <a for="byte sequence">length</a> is greater than 128, then return | ||
|
Uh oh!
There was an error while loading. Please reload this page.