Преглед изворни кода

Exclude "Other" browser from stats

Pouria Ezzati пре 7 година
родитељ
комит
a3d08adfb7
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      server/controllers/urlController.js

+ 2 - 1
server/controllers/urlController.js

@@ -109,7 +109,8 @@ exports.goToUrl = async (req, res, next) => {
   const location = geoip.lookup(req.realIp);
   const country = location && location.country;
   const urls = await findUrl({ id, domain });
-  const isBot = botList.some(bot => agent.source.toLowerCase().includes(bot));
+  const isBot =
+    botList.some(bot => agent.source.toLowerCase().includes(bot)) || agent.family === 'Other';
   if (!urls && !urls.length) return next();
   const [url] = urls;
   if (url.password && !req.body.password) {