mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 23:49:07 +08:00
fix(blocklist): behavioural fixes
This commit is contained in:
parent
3608256569
commit
bc787de62a
@ -94,7 +94,7 @@ const allowedKeywords = [
|
|||||||
"://www.facebook.com/ads/library",
|
"://www.facebook.com/ads/library",
|
||||||
];
|
];
|
||||||
|
|
||||||
function decryptedBlocklist(list: string[]): string[] {
|
export function decryptedBlocklist(list: string[]): string[] {
|
||||||
return hashKey.length > 0
|
return hashKey.length > 0
|
||||||
? list.map((ciphertext) => decryptAES(ciphertext, hashKey))
|
? list.map((ciphertext) => decryptAES(ciphertext, hashKey))
|
||||||
: [];
|
: [];
|
||||||
@ -148,7 +148,7 @@ export function isUrlBlocked(url: string): boolean {
|
|||||||
if (
|
if (
|
||||||
publicSuffix &&
|
publicSuffix &&
|
||||||
blockedlist.some(
|
blockedlist.some(
|
||||||
(blocked) => blocked.startsWith(baseDomain) && blocked !== domain,
|
(blocked) => blocked.startsWith(baseDomain + ".") && blocked !== domain,
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user