Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Add Go-http-client to detect-bot

Steven Tey19cdb2d64f29
diff --git a/apps/web/lib/middleware/utils/detect-bot.ts b/apps/web/lib/middleware/utils/detect-bot.ts
index 2fa191c16a..10fc4843d4 100644
--- a/apps/web/lib/middleware/utils/detect-bot.ts
+++ b/apps/web/lib/middleware/utils/detect-bot.ts
@@ -11,8 +11,9 @@ export const detectBot = (req: NextRequest) => {
* - 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
*/
- return /bot|chatgpt|facebookexternalhit|WhatsApp|google|baidu|bing|msn|duckduckbot|teoma|slurp|yandex|MetaInspector/i.test(
+ return /bot|chatgpt|facebookexternalhit|WhatsApp|google|baidu|bing|msn|duckduckbot|teoma|slurp|yandex|MetaInspector|Go-http-client/i.test(
ua,
);
}