Skip to content

Commit afacb1f

Browse files
noamrannevk
andauthored
Use internal response for Server-Timing processing
The Server-Timing header data is protected by the Timing-Allow-Origin header, so there's no need to safelist it through CORS, unless you wanted direct access to the raw header. Tests: web-platform-tests/wpt#37714. Closes #1511. Co-authored-by: Anne van Kesteren <[email protected]>
1 parent f55a1c7 commit afacb1f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

fetch.bs

+6-1
Original file line numberDiff line numberDiff line change
@@ -4643,7 +4643,12 @@ steps:
46434643
<a for="fetch params">request</a>'s <a for=request>client</a> is a <a>secure context</a>, then set
46444644
<var>timingInfo</var>'s <a for="fetch timing info">server-timing headers</a> to the
46454645
result of <a for="header list">getting, decoding, and splitting</a> `<code>Server-Timing</code>`
4646-
from <var>response</var>'s <a for=response>header list</a>.
4646+
from <var>response</var>'s <a for="filtered response">internal response</a>'s
4647+
<a for=response>header list</a>.
4648+
4649+
<p class=note>Using _response_'s <a for="filtered response">internal response</a> is safe as
4650+
exposing `<code>Server-Timing</code>` header data is guarded through the
4651+
`<code>Timing-Allow-Origin</code>` header.
46474652

46484653
<p>The user agent may decide to expose `<code>Server-Timing</code>` headers to non-secure contexts
46494654
requests as well.

0 commit comments

Comments
 (0)