diff --git a/src/js/heuristicblocking.js b/src/js/heuristicblocking.js index 7209c166b9..f6b3416dcd 100644 --- a/src/js/heuristicblocking.js +++ b/src/js/heuristicblocking.js @@ -124,11 +124,9 @@ HeuristicBlocker.prototype = { let tab_origin = self.tabOrigins[details.tabId]; // return early if tab origin is a localhost address - ['127.0', 'localhost', 'http://localhost'].forEach((localhost) => { - if (tab_origin.startsWith(localhost)) { - return {}; - } - }); + if (window.isPrivateDomain(tab_origin)) { + return {}; + } // ignore first-party requests if (!tab_origin || !utils.isThirdPartyDomain(request_origin, tab_origin)) {