1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2025-06-05 21:49:31 +02:00

Initial commit to add wildcard for Google Fonts and HTML filters (#613)

This commit is contained in:
nobody
2021-08-07 08:39:10 +02:00
parent 67b67bbd68
commit 651d19bfa6
6 changed files with 13 additions and 11 deletions

View File

@ -133,8 +133,8 @@ helpers.getWildcard = function (initiatorDomain) {
};
helpers.checkAllowlisted = function (domain) {
let domainWithoutPrefix, wildcard, list;
helpers.checkAllowlisted = function (domain, list) {
let domainWithoutPrefix, wildcard;
if (domain === null) {
return false;
@ -144,7 +144,6 @@ helpers.checkAllowlisted = function (domain) {
domainWithoutPrefix = domain.slice(Address.WWW_PREFIX.length);
}
wildcard = helpers.getWildcard(domain);
list = requestAnalyzer.allowlistedDomains;
return Boolean(list[domain] || list[domainWithoutPrefix] || list[wildcard] || list[domainWithoutPrefix]);
};