Skip to content

Commit

Permalink
Added WhatsApp to bot list
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-tey committed Feb 24, 2023
1 parent 1cd3726 commit 2475869
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/middleware/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ export const detectBot = (req: NextRequest) => {
/* Note:
* - bot is for most bots & crawlers
* - facebookexternalhit is for Facebook crawler
* - WhatsApp is for WhatsApp crawler
* - MetaInspector is for https://metatags.io/
*/
return /bot|facebookexternalhit|google|baidu|bing|msn|duckduckbot|teoma|slurp|yandex|MetaInspector/i.test(
return /bot|facebookexternalhit|WhatsApp|google|baidu|bing|msn|duckduckbot|teoma|slurp|yandex|MetaInspector/i.test(
ua,
);
}
Expand Down

0 comments on commit 2475869

Please sign in to comment.