Skip to content

Commit

Permalink
fix: pr comment for redirects for main frame requests
Browse files Browse the repository at this point in the history
  • Loading branch information
AugmentedMode committed Dec 12, 2024
1 parent 2392de9 commit 9562bac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,9 @@ function maybeDetectPhishing(theController) {
// blocking is better than tab redirection, as blocking will prevent
// the browser from loading the page at all
if (isManifestV2) {
// redirect the whole tab (even if it's a sub_frame request)
if (details.type === 'main_frame') {
return { redirectUrl: redirectHref };
}
redirectTab(details.tabId, redirectHref);
return { cancel: true };
}
Expand Down

0 comments on commit 9562bac

Please sign in to comment.