File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
builder/source/references/filterslists Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 11import { HTTPS2Request } from '@typescriptprime/securereq'
22import * as AGTree from '@adguard/agtree'
3+ import { AdShieldCDNDomains } from './keywords.js'
34
45const AGBaseFilterListSpecificURL = 'https://adguardteam.github.io/AdguardFilters/BaseFilter/sections/specific.txt'
56const AGBaseFilterListAdShieldKeys = {
@@ -43,7 +44,7 @@ export async function IndexAdShieldDomainsFromAG(): Promise<Set<string>> {
4344 } catch {
4445 return false
4546 }
46- return true
47+ return ! AdShieldCDNDomains . has ( Domain )
4748 } )
4849
4950 return new Set ( FilteredDomains )
Original file line number Diff line number Diff line change 1+ import { HTTPS2Request } from '@typescriptprime/securereq'
2+
3+ export const AdShieldCDNDomains : Set < string > = new Set ( [
4+ 'html-load.com' ,
5+ 'css-load.com' ,
6+ 'ads.adthrive.com'
7+ ] )
8+
9+ export async function IsAdShieldCDNDomain ( Domain : string ) : Promise < boolean > {
10+ const AdShieldCDNCheckResponse = await HTTPS2Request ( new URL ( `https://${ Domain } /` ) , { ExpectedAs : 'String' } ) . catch ( ( ) => false )
11+ return typeof AdShieldCDNCheckResponse !== 'boolean' && AdShieldCDNCheckResponse . StatusCode === 200 &&
12+ AdShieldCDNCheckResponse . Body . includes ( 'This domain is a part of the <a href="https://www.ad-shield.io/">Ad-Shield</a> (ad-shield.io) platform,' )
13+ }
You can’t perform that action at this time.
0 commit comments