overleaf/services/web/frontend/js/features/settings/domain-blocklist.ts
Jakob Ackermann 223b8aa9d8 Merge pull request #12250 from overleaf/ii-add-new-email-blocklist
[web] Prevent Blocklisted domains from appearing as suggestion

GitOrigin-RevId: b02bebe3e043cb264fbdbffce3f783b3af483e95
2023-03-17 09:04:33 +00:00

61 lines
798 B
TypeScript

const domainBlocklist = ['overleaf.com']
const commonTLDs = [
'br',
'cn',
'co',
'co.jp',
'co.uk',
'com',
'com.au',
'de',
'fr',
'in',
'info',
'io',
'net',
'no',
'ru',
'se',
'us',
'com.tw',
'com.br',
'pl',
'it',
'co.in',
'com.mx',
] as const
const commonDomains = [
'gmail',
'googlemail',
'icloud',
'me',
'yahoo',
'ymail',
'yahoomail',
'hotmail',
'live',
'msn',
'outlook',
'gmx',
'mail',
'aol',
'163',
'mac',
'qq',
'o2',
'libero',
'126',
'protonmail',
'yandex',
'yeah',
'web',
'foxmail',
] as const
for (const domain of commonDomains) {
for (const tld of commonTLDs) {
domainBlocklist.push(`${domain}.${tld}`)
}
}
export default domainBlocklist as ReadonlyArray<typeof domainBlocklist[number]>