blacklistUrls not working


#1

I have a 3rd party script on my site that I’m trying to blacklist and I can’t seem to get it work using a regexp

  blacklistUrls: [
   new RegExp(/(http[s]?:\/\/)?[^\s(["<,>]*\.tawk\.[^\s(["<,>]*/, 'g')
 ]

with an error of

{
description: {
isTrusted: True
}, 
sourceURL: https://embed.tawk.to/5b6ec498f31fddsfsdfsdf/default, 
type: TransportError
}

the regexp match all url that contain tawk.to but I’m still getting errors logged.