mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-06-05 21:49:31 +02:00
Allowlist query improved (#563)
This commit is contained in:
@ -136,6 +136,10 @@ helpers.getWildcard = function (initiatorDomain) {
|
|||||||
helpers.checkAllowlisted = function (domain) {
|
helpers.checkAllowlisted = function (domain) {
|
||||||
let domainWithoutPrefix, wildcard, list;
|
let domainWithoutPrefix, wildcard, list;
|
||||||
|
|
||||||
|
if (domain === null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (domain.startsWith(Address.WWW_PREFIX)) {
|
if (domain.startsWith(Address.WWW_PREFIX)) {
|
||||||
domainWithoutPrefix = domain.slice(Address.WWW_PREFIX.length);
|
domainWithoutPrefix = domain.slice(Address.WWW_PREFIX.length);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user