From 42ea89947b52e2854e8a0c9f9bcab6ffc884c70a Mon Sep 17 00:00:00 2001 From: Elbert Alias <77259+AliasIO@users.noreply.github.com> Date: Sat, 17 Oct 2020 08:41:06 +1100 Subject: [PATCH] Update hostname ignore list --- src/drivers/webextension/js/driver.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/drivers/webextension/js/driver.js b/src/drivers/webextension/js/driver.js index c84279c44..f302560d3 100644 --- a/src/drivers/webextension/js/driver.js +++ b/src/drivers/webextension/js/driver.js @@ -13,6 +13,8 @@ const { agent, promisify, getOption, setOption, open } = Utils const expiry = 1000 * 60 * 60 * 24 +const hostnameIgnoreList = /((local|dev(elop(ment)?)?|stag(e|ing)?|preprod|test(ing)?|demo(shop)?|admin|cache)[.-]|localhost|wappalyzer|google|facebook|twitter|reddit|yahoo|wikipedia|amazon|youtube|\/admin|\.local|\.test|\.dev|127\.|0\.)/ + const Driver = { lastPing: Date.now(), @@ -534,7 +536,10 @@ const Driver = { * @param {Boolean} secure */ async getRobots(hostname, secure = false) { - if (!(await getOption('tracking', true))) { + if ( + !(await getOption('tracking', true)) || + hostnameIgnoreList.test(hostname) + ) { return } @@ -649,12 +654,7 @@ const Driver = { hostname ] - if ( - !/((local|dev(elop(ment)?)?|stag(e|ing)?|preprod|test(ing)?|demo(shop)?|admin|cache)[.-]|localhost|google|\/admin|\.local|\.test|\.dev|127\.|0\.)/.test( - hostname - ) && - hits >= 3 - ) { + if (!hostnameIgnoreList.test(hostname) && hits >= 3) { hostnames[url] = hostnames[url] || { applications: resolve(detections).reduce( (technologies, { name, confidence, version }) => {