Skip to content

Commit b0829b6

Browse files
authored
Only target main frame navigations for link tracking (duckduckgo#2052)
1 parent af63361 commit b0829b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DuckDuckGo/TabViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ extension TabViewController: WKNavigationDelegate {
12971297

12981298
// This check needs to happen before GPC checks. Otherwise the navigation type may be rewritten to `.other`
12991299
// which would skip link rewrites.
1300-
if navigationAction.navigationType != .backForward {
1300+
if navigationAction.navigationType != .backForward && navigationAction.isTargetingMainFrame() {
13011301
let didRewriteLink = linkProtection.requestTrackingLinkRewrite(initiatingURL: webView.url,
13021302
navigationAction: navigationAction,
13031303
onStartExtracting: { showProgressIndicator() },

0 commit comments

Comments
 (0)