mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-13 01:30:37 +08:00
Fix reject whitelist
This commit is contained in:
parent
62c44b0bee
commit
cefe301ac4
@ -138,9 +138,9 @@ async function processFilterRules(filterRulesUrl, fallbackUrls) {
|
||||
*/
|
||||
const addToWhiteList = (domainToBeAddedToWhite, isSubDomain = true) => {
|
||||
if (isSubDomain && domainToBeAddedToWhite[0] !== '.') {
|
||||
blacklistDomainSets.add(`.${domainToBeAddedToWhite}`);
|
||||
whitelistDomainSets.add(`.${domainToBeAddedToWhite}`);
|
||||
} else {
|
||||
blacklistDomainSets.add(domainToBeAddedToWhite);
|
||||
whitelistDomainSets.add(domainToBeAddedToWhite);
|
||||
}
|
||||
};
|
||||
|
||||
@ -157,6 +157,8 @@ async function processFilterRules(filterRulesUrl, fallbackUrls) {
|
||||
if (hostname.includes(DEBUG_DOMAIN_TO_FIND)) {
|
||||
warnOnce(filterRulesUrl.toString(), flag === 0 || flag === -1, DEBUG_DOMAIN_TO_FIND);
|
||||
foundDebugDomain = true;
|
||||
|
||||
console.log({ result, flag });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user