Skip to content

Commit 3dee902

Browse files
committed
Updated probely.js and +server.js
1 parent 81b60e2 commit 3dee902

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

src/lib/security/probely.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff 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
*/
2525
export 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

src/routes/__audit/headers/+server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)