diff --git a/src/services/cipher.service.ts b/src/services/cipher.service.ts index 20538d3ab0..3f54ffa718 100644 --- a/src/services/cipher.service.ts +++ b/src/services/cipher.service.ts @@ -52,6 +52,10 @@ const Keys = { neverDomains: 'neverDomains', }; +const DomainMatchBlacklist = new Map>([ + ['google.com', new Set(['script.google.com'])], +]); + export class CipherService implements CipherServiceAbstraction { // tslint:disable-next-line _decryptedCipherCache: CipherView[]; @@ -352,7 +356,14 @@ export class CipherService implements CipherServiceAbstraction { case undefined: case UriMatchType.Domain: if (domain != null && u.domain != null && matchingDomains.indexOf(u.domain) > -1) { - return true; + if (DomainMatchBlacklist.has(u.domain)) { + const domainUrlHost = Utils.getHost(url); + if (!DomainMatchBlacklist.get(u.domain).has(domainUrlHost)) { + return true; + } + } else { + return true; + } } break; case UriMatchType.Host: