Browse Source

Exclude "Other" browser from stats

Pouria Ezzati 7 năm trước cách đây
mục cha
commit
a3d08adfb7
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  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) {