Skip to content

Commit c77a385

Browse files
feat: Block Lighthouse cryptic user agent
Believe it or not, this is Lighthouse's user agent. They don't usually include "lighthouse" in it anymore because some people were gaming the system for LH scores, so they use some cryptic UAs now. I'll just ignore this outright because not many people will actually have that UA, and this might cause some big bills for some customers.
1 parent b6a1dbb commit c77a385

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utils/blocked-uas.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export const DEFAULT_BLOCKED_UA_STRS = [
1717
'bot.php',
1818
'(bot;',
1919
'bot/',
20-
'chrome-lighthouse',
2120
'crawler',
2221
'dataforseobot',
2322
'deepscan',
@@ -80,6 +79,10 @@ export const DEFAULT_BLOCKED_UA_STRS = [
8079
'mediapartners-google',
8180
'storebot-google',
8281
'bytespider',
82+
83+
// Believe it or not, these both are Lighthouse
84+
'chrome-lighthouse',
85+
'moto g power (2022)', // Full UA: Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Mobile Safari/537.36
8386
]
8487

8588
/**

0 commit comments

Comments
 (0)