mirror of
https://github.com/movixcorp/MovixOpenSource.git
synced 2026-07-29 19:39:10 +00:00
HOTFIX : userscript fctv33 proxy
This commit is contained in:
parent
5b96291f53
commit
2eacbcc88f
1 changed files with 8 additions and 6 deletions
|
|
@ -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",
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue