Skip to content

Commit

Permalink
Add back the check for Sec-Browsing-Topics
Browse files Browse the repository at this point in the history
  • Loading branch information
xyaoinum authored Nov 14, 2023
1 parent 1391d36 commit 1b1f933
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -639,9 +639,10 @@ spec: html; urlPrefix: https://www.rfc-editor.org/rfc/

<div algorithm>
To <dfn>handle topics response</dfn>, given a [=response=] |response| and a [=request=] request:
1. If |request|'s [=request/header list=] does not [=list/contain=] [:Sec-Browsing-Topics:] (implying the |request|'s [=request/current URL=] is not eligible for topics), then return.
1. Let |topLevelDocument| be |request|'s [=request/window=]'s [=environment settings object/global object=]'s [=Window/navigable=]'s [=navigable/top-level traversable=]'s [=navigable/active document=].
1. let |callerOrigin| be |request|'s [=request/current URL=]'s [=url/origin=].
1. If the user preference setting or other user agent-defined mechanisms like <a href="https://github.com/privacysandbox/attestation">enrollment</a> disallow access to topics from |topLevelDocument| given |callerOrigin|, then return.
1. Let |callerOrigin| be |request|'s [=request/current URL=]'s [=url/origin=].
1. If the user preference setting or other user agent-defined mechanisms like <a href="https://github.com/privacysandbox/attestation">enrollment</a> disallows access to topics from |topLevelDocument| given |callerOrigin|, then return.
1. Let |callerDomain| be |callerOrigin|'s [=origin/host=]'s [=host/registrable domain=].
1. Let |list| be |response|'s [=response/header list=].
1. Let |observe| be the result of running [=get a structured field value=] algorithm given [:Observe-Browsing-Topics:], "item", and |list| as input.
Expand Down

0 comments on commit 1b1f933

Please sign in to comment.