Skip to content

Commit 908fbbd

Browse files
committed
fix: handle empty user agent in bot detection
1 parent 6c71a31 commit 908fbbd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/functions/utils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,8 @@ export function isPotentialBot(userAgent: string | undefined): boolean {
4141
if (!userAgent || userAgent.startsWith("Bun/")) {
4242
return false;
4343
}
44+
if (userAgent === "") {
45+
return true;
46+
}
4447
return isbot(userAgent);
4548
}

0 commit comments

Comments
 (0)