Skip to content

Commit

Permalink
Fix how blocked requests made inside nested 'about:blank' iFrames are…
Browse files Browse the repository at this point in the history
… counted (duckduckgo#1019)
  • Loading branch information
alisha committed Oct 15, 2024
1 parent ffcbeb2 commit 443d9d5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
// FROM: https://stackoverflow.com/a/7739035/73479
// FIX: Better capturing of top level URL so that trackers in embedded documents are not considered first party
if (window.location !== window.parent.location) {
return new URL(window.location.href !== 'about:blank' ? document.referrer : window.parent.location.href)
return new URL(window.location.href !== 'about:blank' ? document.referrer : window.parent.origin)
} else {
return new URL(document.location.href)
}
Expand Down

0 comments on commit 443d9d5

Please sign in to comment.