HOTFIX : userscript fctv33 proxy

This commit is contained in:
Movix 2026-07-05 00:27:29 +02:00
parent 5b96291f53
commit 2eacbcc88f

View file

@ -145,13 +145,15 @@
}
function wildcardToRegExp(pattern) {
// DNR urlFilter semantics: `*` is a wildcard, everything else is a
// SUBSTRING match (not anchored). A bare filter like "/cfall/s" must match
// anywhere in the URL, so it must NOT be wrapped in ^...$ — otherwise the
// FCTV Referer rule never fires and the CDN 403s ("deny by referer").
return new RegExp(
"^" +
String(pattern || "*")
.split("*")
.map((part) => escapeRegExp(part))
.join(".*") +
"$",
String(pattern || "*")
.split("*")
.map((part) => escapeRegExp(part))
.join(".*"),
"i",
);
}