Skip to content

Commit

Permalink
Add comment for sec-fetch-dest iframe value
Browse files Browse the repository at this point in the history
  • Loading branch information
anagstef committed Jul 11, 2024
1 parent a73c9b9 commit 203414f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/backend/src/tokens/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ function isRequestEligibleForHandshake(authenticateContext: { secFetchDest?: str
const { accept, secFetchDest } = authenticateContext;

// NOTE: we could also check sec-fetch-mode === navigate here, but according to the spec, sec-fetch-dest: document should indicate that the request is the data of a user navigation.
// Also, we check for 'iframe' because it's the value set when a doc request is made by an iframe.
if (secFetchDest === 'document' || secFetchDest === 'iframe') {
return true;
}
Expand Down

0 comments on commit 203414f

Please sign in to comment.