Skip to content

Commit 17723c6

Browse files
authored
Add "serialize a request URL for reporting"
This is useful for Cross-Origin-Embedder-Policy.
1 parent e057e92 commit 17723c6

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

fetch.bs

+22
Original file line numberDiff line numberDiff line change
@@ -1747,6 +1747,28 @@ is to return the result of <a>serializing a request origin</a> with <var>request
17471747
<p class=note>Features that combine multiple responses into one logical resource are historically a
17481748
source of security bugs. Please seek security review for features that deal with partial responses.
17491749

1750+
<hr>
1751+
1752+
<p>To <dfn export>serialize a request URL for reporting</dfn>, given a <a for=/>request</a>
1753+
<var>request</var>, run these steps:
1754+
1755+
<ol>
1756+
<li>
1757+
<p>Let <var>url</var> be a copy of <var>request</var>'s <a for=request>URL</a>.
1758+
1759+
<p class="note">This is not <var>request</var>'s <a for=request>current URL</a> in order to avoid
1760+
leaking information about redirect targets (see
1761+
<a href="https://w3c.github.io/webappsec-csp/#security-violation-reports">similar considerations for CSP reporting</a>
1762+
too). [[CSP]]
1763+
1764+
<li><p><a>Set the username</a> given <var>url</var> and the empty string.
1765+
1766+
<li><p><a>Set the password</a> given <var>url</var> and the empty string.
1767+
1768+
<li><p>Return the <a lt="url serializer">serialization</a> of <var>url</var> with the
1769+
<i>exclude fragment flag</i> set.
1770+
</ol>
1771+
17501772

17511773
<h4 id=responses>Responses</h4>
17521774

0 commit comments

Comments
 (0)