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:
@ -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]);
|
||||
};
|
||||
|
Reference in New Issue
Block a user