File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -15,15 +15,21 @@ This file is part of Network Pro.
1515 * @updated 2025-11-11
1616 */
1717
18- /** @typedef {{ ua: string, ip: string } } ScannerInput */
18+ /** @typedef {{ ua? : string, ip? : string } } ScannerInput */
1919
2020/**
2121 * Check if a request is likely from Probely.
2222 * @param {ScannerInput } input
2323 * @returns {boolean } - True if the request matches Probely’s fingerprint.
2424 */
2525export function isProbelyScanner ( { ua, ip } ) {
26- const PROBELY_UA_FRAGMENT = 'probelyspdr/' ;
26+ const PROBELY_UA_FRAGMENTS = [
27+ 'probelyspdr/' ,
28+ 'probelyfp/' ,
29+ 'probelymrkt' ,
30+ 'probelysc' ,
31+ 'python-httpx/' ,
32+ ] ;
2733 const PROBELY_IPS = [
2834 '18.235.241.170' ,
2935 '52.65.214.19' ,
@@ -41,7 +47,10 @@ export function isProbelyScanner({ ua, ip }) {
4147 const normalizedIP = ip ?. trim ( ) ?? '' ;
4248
4349 return (
44- normalizedUA . includes ( PROBELY_UA_FRAGMENT ) ||
45- PROBELY_IPS . includes ( normalizedIP )
50+ PROBELY_UA_FRAGMENTS . some ( ( fragment ) =>
51+ normalizedUA . includes ( fragment . toLowerCase ( ) ) ,
52+ ) || PROBELY_IPS . includes ( normalizedIP )
4653 ) ;
4754}
55+
56+ // cspell:ignore probelyfp probelymrkt probelysc httpx
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export function GET(_event) {
2727 'X-Env' : process . env . NODE_ENV ?? 'undefined' ,
2828 'X-Mode' : process . env . ENV_MODE ?? 'unset' ,
2929 'X-Public-Mode' : process . env . PUBLIC_ENV_MODE ?? 'unset' ,
30- 'X-Check' : 'audit-path-active'
31- }
30+ 'X-Check' : 'audit-path-active' ,
31+ } ,
3232 } ) ;
3333}
You can’t perform that action at this time.
0 commit comments