feat(clean_url): esvalabs
This commit is contained in:
parent
c242de27ea
commit
b68209e14b
|
|
@ -19,7 +19,8 @@ const safeLinks = [
|
|||
'safelinks\\.protection\\.outlook\\.com',
|
||||
'\\.protection\\.sophos\\.com',
|
||||
'linkprotect\\.cudasvc\\.com',
|
||||
'ctp\\.trendmicro\\.com'
|
||||
'ctp\\.trendmicro\\.com',
|
||||
'urlsand\\.esvalabs\\.com'
|
||||
]
|
||||
|
||||
const deSafelink = (urlStr) => {
|
||||
|
|
@ -87,6 +88,11 @@ const deSafelink = (urlStr) => {
|
|||
url = new URL(url.searchParams.get('q'))
|
||||
}
|
||||
|
||||
// EsvaLabs
|
||||
if (url.hostname === 'urlsand.esvalabs.com') {
|
||||
url = new URL(url.searchParams.get('u'))
|
||||
}
|
||||
|
||||
// "Just have to go deep enough."
|
||||
if (url.hostname.match(new RegExp(safeLinks.join('|')))) {
|
||||
return deSafelink(url.href)
|
||||
|
|
|
|||
Loading…
Reference in New Issue