diff --git a/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Requests.cpp b/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Requests.cpp index 5611aa504c7..0304ab55232 100644 --- a/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Requests.cpp +++ b/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Requests.cpp @@ -346,7 +346,7 @@ void Request::add_origin_header() case ReferrerPolicy::ReferrerPolicy::StrictOriginWhenCrossOrigin: // If request’s origin is a tuple origin, its scheme is "https", and request’s current URL’s scheme is // not "https", then set serializedOrigin to `null`. - if (m_origin.has() && m_origin.get().scheme() == "https"sv && current_url().scheme() != "https"sv) + if (m_origin.has() && !m_origin.get().is_opaque() && m_origin.get().scheme() == "https"sv && current_url().scheme() != "https"sv) serialized_origin = MUST(ByteBuffer::copy("null"sv.bytes())); break; // -> "same-origin"