Skip to content

Commit b4aebfd

Browse files
committed
Send "null" Origin header on cross-origin .onion requests
Fixes #1350.
1 parent 3ecab20 commit b4aebfd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

fetch.bs

+8
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ urlPrefix:https://w3c.github.io/hr-time/#;spec:hr-time
111111
"href": "https://datatracker.ietf.org/doc/html/draft-ietf-masque-h3-datagram",
112112
"publisher": "IETF",
113113
"title": "Using QUIC Datagrams with HTTP/3"
114+
},
115+
"ONION": {
116+
"aliasOf": "RFC7686"
114117
}
115118
}
116119
</pre>
@@ -2820,6 +2823,11 @@ given a <a for=/>request</a> <var>request</var>, run these steps:
28202823
<li><p>Let <var>serializedOrigin</var> be the result of <a>byte-serializing a request origin</a>
28212824
with <var>request</var>.
28222825

2826+
<li><p>If <var>request</var>'s <a for=request>current URL</a>'s <a for=url>origin</a>'s
2827+
<a for=origin>host</a> ends with "<code>.onion</code>" or "<code>.onion.</code>", and
2828+
is not <a>same origin</a> with <var>request</var>'s <a for=request>origin</a>, then set
2829+
<var>serializedOrigin</var> to `<code>null</code>`. [[ONION]]
2830+
28232831
<li><p>If <var>request</var>'s <a for=request>response tainting</a> is "<code>cors</code>" or
28242832
<var>request</var>'s <a for=request>mode</a> is "<code>websocket</code>", then
28252833
<a for="header list">append</a> (`<code>Origin</code>`, <var>serializedOrigin</var>) to

0 commit comments

Comments
 (0)