LibWeb: Implement EmbedderPolicy struct

This commit is contained in:
Jamie Mansfield 2024-07-08 22:54:49 +01:00 committed by Andreas Kling
parent f073f8301c
commit 190a419715
Notes: sideshowbarker 2024-07-17 11:29:41 +09:00
8 changed files with 89 additions and 2 deletions

View file

@ -358,7 +358,9 @@ bool Request::cross_origin_embedder_policy_allows_credentials() const
if (m_client == nullptr)
return true;
// FIXME: 3. If requests clients policy containers embedder policys value is not "credentialless", then return true.
// 3. If requests clients policy containers embedder policys value is not "credentialless", then return true.
if (m_policy_container.has<HTML::PolicyContainer>() && m_policy_container.get<HTML::PolicyContainer>().embedder_policy.value != HTML::EmbedderPolicyValue::Credentialless)
return true;
// 4. If requests origin is same origin with requests current URLs origin and request does not have a redirect-tainted origin, then return true.
// 5. Return false.