Skip to content

Commit

Permalink
add bluesky to detectBot
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-tey committed Nov 14, 2024
1 parent 618b461 commit 7491480
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/web/lib/middleware/utils/detect-bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ export const detectBot = (req: Request) => {
/* Note:
* - bot is for most bots & crawlers
* - ChatGPT is for ChatGPT
* - bluesky is for Bluesky crawler
* - facebookexternalhit is for Facebook crawler
* - WhatsApp is for WhatsApp crawler
* - MetaInspector is for https://metatags.io/
* - Go-http-client/1.1 is a bot: https://user-agents.net/string/go-http-client-1-1
* - iframely is for https://iframely.com/docs/about (used by Notion, Linear)
*/
return /bot|chatgpt|facebookexternalhit|WhatsApp|google|baidu|bing|msn|duckduckbot|teoma|slurp|yandex|MetaInspector|Go-http-client|iframely/i.test(
return /bot|chatgpt|bluesky|facebookexternalhit|WhatsApp|google|baidu|bing|msn|duckduckbot|teoma|slurp|yandex|MetaInspector|Go-http-client|iframely/i.test(
ua,
);
}
Expand Down

0 comments on commit 7491480

Please sign in to comment.